L
Lupe
Hi
I've created a Word template with many mergefields and includetexts. The
data source is in Excel. I want the users to be able to open automatically
via a macrobutton a new Word file based on my template when they finish enter
their source data and merge the information.
I have already managed to open an existing file via a macrobutton. I got the
following code from a post of Sept 2006 by moon. How can I elaborate on this
code to get a new file to open based on another template than normal.dot?
"Dim WRDAPP, WRDDOC
Set WRDAPP = CreateObject("Word.Application")
Set WRDDOC = WRDAPP.Documents.Open("C:\Security\Procesverbaal.doc")
'Or for a new doc:
'Set WRDDOC = WRDAPP.Documents.Add
WRDAPP.Visible = True
'WRDAPP.Quit"
Regards, Lupe
I've created a Word template with many mergefields and includetexts. The
data source is in Excel. I want the users to be able to open automatically
via a macrobutton a new Word file based on my template when they finish enter
their source data and merge the information.
I have already managed to open an existing file via a macrobutton. I got the
following code from a post of Sept 2006 by moon. How can I elaborate on this
code to get a new file to open based on another template than normal.dot?
"Dim WRDAPP, WRDDOC
Set WRDAPP = CreateObject("Word.Application")
Set WRDDOC = WRDAPP.Documents.Open("C:\Security\Procesverbaal.doc")
'Or for a new doc:
'Set WRDDOC = WRDAPP.Documents.Add
WRDAPP.Visible = True
'WRDAPP.Quit"
Regards, Lupe