Questions

VBScript for Word document automation

Tags:
+
0 Votes
Locked

VBScript for Word document automation

tsettefrati
I have a VBScript that handles the generation of multiple Word documents. It opens a Word Template with form fields and Mail Merge REF fields. The REF fields point to the bookmark of one of the form fields.

I have the form fields marked as "Calculate on Exit" so that the Ref fields are automatically updated if the template is protected. However, Word requires keyboard input for this to work. If the template is not protected, each ref field has to be selected and updated manually.

We want the user to have as little contact as possible with the content of the document. Is it possible, through VBScript, to either simulate keyboard input in the word document (to simulate the "Tab" key being hit to exit the field) or to update the Ref fields?

Thanks for your help.