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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mailmerge problem

Status
Not open for further replies.

psemianonymous

Programmer
Dec 2, 2002
1,877
US
I have a Word mailmerge document that I open using late-binding in VBA. I run the mailmerges on my machine perfectly fine, but on other machines, they are given a popup to confirm the data source. Sigh.

Here is the original thread: thread181-817153 - please post replies there, if that's okay.


Here is my line where I think the problem is occuring:
Code:
objWordDoc.MailMerge.OpenDataSource _
        NAME:=strMailmergeDataFilename, ConfirmConversions:=False, _
        ReadOnly:=True, LinkToSource:=True, AddToRecentFiles:=False, _
        PasswordDocument:="", PasswordTemplate:="",  _
        WritePasswordDocument:="", _
        WritePasswordTemplate:="", Revert:=False, Format:=0, _
        Connection:="", SQLStatement:="", SQLStatement1:=""
 
I think the mailmerge document was the data source kind of built-in. On another machine, the document will look for the "built-in" path...and may not find it. Load the document, go into mailmerge helper, and change the data source path.
 
Negative. I change the mailmerge data source every single time I open the mailmerge document. I wish I could link it to a 'stable' data source, and then make the document stick to that stable data source, but alas, Word takes the reins from me in that regard.

And the point of me writing a ream of code is so that my users don't have to see a dialog box and do the work manually anyways. Especially as some of them will be totally lost as to what to do. It's just an unacceptable solution.


Pete
PS--again, further replies please go in the linked thread. I'd like to keep a 'consensus' of all replies on one thread Thread181-817153 , so everone gets to see the answers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top