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
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