Merge dissapears.. with an Excel Macro.

G

GastonFranzini

Hi,
I have a huge problem... I open a Word File and then when I Print it
the merged links break...
But when I do this operations without the Macro It works fine. What am
I doing wrong?
--------------

Sub wordchage()

Dim WordApp As Object
Dim Doc As Object


Set WordApp = CreateObject("Word.Application")

fpath = ThisWorkbook.Path

Doc1 = fpath & "\" & ("Base booklet.doc")
Sheets("Incumbent").Select
fname = Range("A3")
fnamedoc = fname & ".doc"

Set Doc = WordApp.Documents.Open(Doc1)

Application.DisplayAlerts = False
WordApp.Activedocument.SaveAs Filename:=fpath & "\" & fnamedoc
WordApp.Activedocument.PrintOut
'WordApp.NormalTemplate.Saved = True
WordApp.Activedocument.Close
Sleep (1)

Set WordApp = Nothing
Set Doc = Nothing

End Sub
 

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