WORD - Excel automation

V

Vsn

Hi All,

Who can give me a clue on some automation issue. I do use the following code
to open a WORD 'mail merge' document from Excel. The document opens without
a trouble, unfortunatly it does not link to the excel file which contains
data. If I open the same WORD file from Windows explorer (or word direct) it
links to the data file........

How can I use atomation and link the document to it's 'mail merge' data?


Private Sub cmdEnvelopePrint_Click()
Dim objWord As Object

Set objWord = CreateObject("Word.Application")
objWord.Visible = True
objWord.Documents.Open _
Filename:="D:\My Documents\05_Vsn_Data\000000_Envelope.doc", _
ReadOnly:=True
With objWord
.Application.WindowState = 1
.ActiveWindow.ActivePane.View.Zoom.Percentage = 75
End With

Set objWord = Nothing
End Sub


Thx for any advice

Ludovic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top