Hi all,
I have created a dynamic mailmerge from access That is driving me nuts. First I have to merge more than one record but I must merge it one record at a time, then save the document with a unique name. (this is so I can attach them individually to a fax cover sheet and dynamically fax them off one at a time using WinFax v.10) Here is my problem. Using the MergeIt function from MS I have been able to do this. What I ran into was having to open word and destroy word everytime...This waists time and CPU. So I set up the MergeIt function in a Select Case and passed a single to it from the main code. The single tells MergeIt if it is the First Record, Last Record or something in between. Based on this, if it is the first record then MergeIt does the GetObject, does its merge then returns (leaving the Word and the Main Merge document open). Then when the Record is something in between MergeIt goes in and tries to send a new record to the main merge document. This is where the problem is--> it errors out stating "Run-time error '91:'Object variable or With block Variable not set". Now the problem: I am using the getobject function. If I set the object again it will open a new word object. Is there any way around this? I know this is long and I appologize. Thanks for any help or insight.
Scott :
I have created a dynamic mailmerge from access That is driving me nuts. First I have to merge more than one record but I must merge it one record at a time, then save the document with a unique name. (this is so I can attach them individually to a fax cover sheet and dynamically fax them off one at a time using WinFax v.10) Here is my problem. Using the MergeIt function from MS I have been able to do this. What I ran into was having to open word and destroy word everytime...This waists time and CPU. So I set up the MergeIt function in a Select Case and passed a single to it from the main code. The single tells MergeIt if it is the First Record, Last Record or something in between. Based on this, if it is the first record then MergeIt does the GetObject, does its merge then returns (leaving the Word and the Main Merge document open). Then when the Record is something in between MergeIt goes in and tries to send a new record to the main merge document. This is where the problem is--> it errors out stating "Run-time error '91:'Object variable or With block Variable not set". Now the problem: I am using the getobject function. If I set the object again it will open a new word object. Is there any way around this? I know this is long and I appologize. Thanks for any help or insight.
Scott :