The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic Uploading of PDF Renditions of Word Documents

Craig Senior
May 29, 2020

We have a business rule: Every time we save and close an attached Word document, upload a corresponding PDF rendition to the same location. The PDF is considered transitory, so if something goes wrong with it, I just replace it.

I have some Word VBA that saves a PDF rendition to a local folder, which I happen to leave open in Windows Explorer. After I close the Word document and Upload it through Atlassian, I drag and drop the PDF from Windows to Confluence, all good and my conformance is pretty much 100%.

I'd like to automate the PDF upload. Is it possible? I'm thinking if I saved the PDF to the same Windows folder as the Active Document (Word), Atlassian could see it and upload it to the same location in Confluence. If it is a duplicate, it would upload as a new version.

Is it possible?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
May 29, 2020

With Confluence Server you have access to talking to Confluence over WebDAV. If you are using Windows this means that you can map your Confluence site to a drive letter and work with it as if it were a file system.

  • Go to "This PC" and click Map network drive
    image.png
  • In the folder field put in this "https://{yourserverroot}/plugins/servlet/confluence/default" replacing the {yourserverroot} with your actual server root.
    image.png
  • Voila! You now how Confluence mapped to a drive letter. Remember with great power comes great responsibility. You can do great good or harm this way.
  • Now you can reference the pages in VBA via the file system.

Here is the how the filesystem is represented. You will see top level folders for Global and Personal. This represents Global and Personal spaces. Under Global you will see a folder for each space via space key. Under each space folder you will see folders for each page. Inside each page folder you will see a file that is {folder name}.txt. That is the contents of the page. Any other files in that folder are attachments to the page.

Craig Senior
May 29, 2020

That did the trick nicely. Thank you!

Like • Davin Studer likes this
TAGS
AUG Leaders

Atlassian Community Events