LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Open new Word file via Excel

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.d oc")
'Or for a new doc:
'Set WRDDOC = WRDAPP.Documents.Add

WRDAPP.Visible = True
'WRDAPP.Quit"
Regards, Lupe

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
open word from excel...file does not exist error tbaam Excel Programming 9 January 16th 07 03:34 PM
Word and Excel crash when I try to open a folder to get to a file DGD41 Excel Discussion (Misc queries) 7 April 15th 06 09:14 PM
Using an Excel macro to open a Word File lhyer Excel Programming 4 July 18th 05 09:28 PM
Open One Word File from Excel Stratuser Excel Programming 6 January 27th 04 06:37 PM
Graph Excel Selection, Open Word File, Embed Graph Into Word Steve Excel Programming 0 November 17th 03 05:35 PM


All times are GMT +1. The time now is 09:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"