Skip to main content
Question

JS/VB script auto create PDF when office docx checked in

  • December 23, 2021
  • 3 replies
  • 143 views

Forum|alt.badge.img+16
  • Hero (Customer)
  • 666 replies

Community,

 

wondering who can share the Java or VB script that could auto create PDF when Microsoft office document, e.g. DOCX are checked in.

 

Thank you in advance.

3 replies

Forum|alt.badge.img+14
  • Superhero (Employee)
  • 179 replies
  • January 4, 2022

@ronhu 

Hi ronhu,

 

Please try the attached macro blocks. In this scenario if you check-in a docx file pdf also get attached to the system and pdf file will be saved in the same location.

I have separated the each macro block start end comments.

 

Regards,

Sahan

 

 


Forum|alt.badge.img+16
  • Author
  • Hero (Customer)
  • 666 replies
  • January 4, 2022

@Sahan Udana Appreciated. will try.


Mathias Dahl
Superhero (Employee)
Forum|alt.badge.img+32
  • Superhero (Employee)
  • 2898 replies
  • January 9, 2022

FYI, just some friendly hints:

All these calls are probably not needed:

A2A("ACTUAL_FINISH")A2A("ALTERNATE_DOCUMENT_NUMBER")

Because, if you check the source code for A2A you can see it sets values in O_DOCARRAY, but O_DOCARRAY is never used anywhere in the macro for anything else. So you can remove those calls as well as the A2A procedure itself.

Also, you do not need uppercase for all the code. Probably it would be more readable by using a more standard VBScript “syntax”. And some indentation would not hurt either :)

@ronhu let us know if you got the code to work.

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings