Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mail merge question...Telsa-Mary Maybe you can help

Status
Not open for further replies.

Scoty

Programmer
Oct 25, 2000
278
US
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 know this is short and sweet (or not)
did you try to save the info. to an RTF Doc instead or messing with Word.

DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Doug thanks for your reply. Yes I have tryed the RTF. The problem that I am running into is I have to put a graphical header and footer on the page that I am faxing. RTF will not support this. (the header and footer makes it look like letterhead). Anyway I think I figured the problem out. I declared my objects globally (in the form). Then I just called them from the parent code. This seems to work for now.
Thanks
Scotty ::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top