Skip to main content

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.

@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

 

 


@Sahan Udana Appreciated. will try.


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