Running Microsoft Word Macros with RPE!
Hello!
I have successfully made a formatting macro to run on microsoft word documents, verified that when I run the macro through word it works consistently.
I have an RPE template, that pulls information from Quality Manager and generates several different documents in one go. I then tried to get the RPE to run the macro for me by following the instructions of pointing to the correct style sheet and typing in the macro name of said stylesheet. The stylesheet is a macro enabled template.
RPE Launcher gives me no grief but when I go to click the documents, they have not had the formatting macro run on them. I have trouble shooted this to death and can't figure out how to the RPE template to run the macro as it processes each generated document.
Does anyone have any suggestions for root causing this? Does RPE not work for Microsoft Word document Macros?
Thank you for your time.
|
3 answers
Hi David,
Have you got macro security settings set to minimum?
You might find you can run a macro manually but it won't run from RPE if the security settings are too strict.
If the macro exists in the stylesheet and you name the macro in the macro field in the specification field then it should work.
You might want to try modifying the specification/template to only generate one document for debugging purposes.
Maybe also try a simple dummy macro that just pops up an 'OK' box to test whether basic macro invocation is working.
|
Hello Sean!
By macro security settings, you mean the settings within Microsoft word? I have it set to enable anything with no notification needed. Are there other macro settings you are referring to within Word or RPE?
For debugging I did something similar where I just told the Macro to highlight text turquoise so that its easy to tell. So far no coloring will show up in the troubleshooting doc I have been running.
Is there any trick tot he macro name in the field? Say my macro is called "makeRed" would that be all I need to type in the field? do I need to include the "( )" from the code? |
Can you please confirm if macro executim was really done. You should see the following messages in console/log:
Comments
David Gutierrez
commented Apr 07 '20, 2:25 p.m.
Thank you for that, I actually did not know about the console view. So after running the console vie wit seems I should update the context and problem.
Subramanya Prasad Pilar
commented Apr 07 '20, 9:54 p.m.
Let me clarify on RPE spec producing several various reports. Do you mean multiple Word output files? If so, how it is achieved? Using Document Break element in the template or running document generation in batch mode?
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.