04-08-2009 02:39 AM
i've build a Microsoft Word marco implemented in VBA and execute this macro with the help of the Document_New and Document_Open Sub. The problem is that the marco depends on Document Variables set by Act (for example I want to process the "Jobtitle" by executing ActiveDocument.Variables("[ACTFIELD]TBL_CONTACT.JOBTITLE")) seem not to be available at this time. All Variables contain only the descriptor (like "<Title>"). Executing the macro after the Document is loaded completely works fine.
First, I tried to set a timer in Document_Open, but Act waits for this timer (the "Mail Merge" progress bar is displayed). Is there any other method to execute my macro? I am sure that I am not the first with this problem, but I was unable to find a "automatic" solution.
04-09-2009 03:50 PM
What do you want the macro to do?
Remember the merge uses code that probably avoids other macros to ensure it works.
If you're trying to do Conditional If/Then type stuff, maybe this will help: