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

Continuing the thread705-1085150 dialog re: Mail merge 1

Status
Not open for further replies.

steve728

Programmer
Mar 16, 2003
536
US
When using the following code:

Dim objWord As Word.DOCUMENT
Set objWord = GetObject("N:\Etna\ADOT.Doc", "Word.document")
'Make Word visible
objWord.Application.Visible = True
'Execute the mail merge
objWord.MailMerge.Execute

I still get the darn "Opening this document..." prompt.
What am I doing wrong or omitting.

Steve
 
Have you tried:

Dim oApp As Object
Set oApp = CreateObject("Word.Application")
oApp.Documents.Open ("N:\Etna\ADOT.doc")
oApp.Visible = True
Set oApp = Nothing
 
It worked perfectly! You get a star!

Steve G.
 
I spoke too soon. The Word document comes up without a prompt alright but, the document has old data merged in. The underlying data in the table is not reflected in it.
Any way to refersh this data while using this code?

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top