I have a VBScript that creates a new document from a teplate (.dot) and inserts data from another application. When the data has been inserted I want to run the macro that protects the document(allow only forms). It is working when the macro exists in the wordtemplate. If I want to open another template I get an error message because the macro does not exist. How can I make the script to run only if the macro exists in the word template? My code for running macro: WordApp.Run("ProtectDocument")
Red Flag Submitted
Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Tek-Tips forums is a member-only feature.