Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I modified your code as follows and put it in a blank document. I then
hyperlinked to the blank document: Sub Document_Open() With CreateObject("word.application") .Documents.Add _ Template:="Location To Your\Template Name.dotm", _ NewTemplate:=False, DocumentType:=0 .Visible = True End With Application.Quit savechanges:=wdDoNotSaveChanges End Sub When the hyperlink opens the blank document, the code opens the template, creating a new document and then closes the first (blank) document, leaving only the desired new document open. Thanks for your help. "Héctor Miguel" wrote: hi, Neil ! I am using Excel as a menu for 100 users so they don't have to know where the files and templates are kept on the server... perhaps using (protected) code ?... Sub NewDocTemplateBased() With CreateObject("word.application") .Documents.Add _ Template:="Location To Your\Template Name.dot", _ NewTemplate:=False, DocumentType:=0 .Visible = True End With End Sub hth, hector. . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Determine when Word document opens successfully from Excel VBA | Excel Programming | |||
editting a template | New Users to Excel | |||
help creating a macro in excel that opens a specific word document | Excel Discussion (Misc queries) | |||
Macro in template opens last saved document | Excel Programming | |||
Word document from template | Excel Programming |