Hyperlink opens word template for editting, not as new document

N

Neil Humphries

I have created hyperlinks to Word documents and templates in Excel. Clicking
the hyperlinks causes the templates to open in Word for editting. I need to
have the templates open new documents based on the templates. How can I do
this?
 
H

Héctor Miguel

hi, Neil !
I have created hyperlinks to Word documents and templates in Excel.
Clicking the hyperlinks causes the templates to open in Word for editting.
I need to have the templates open new documents based on the templates.
How can I do this?

create shortcuts (.lnk) to the template document and hyperlink to that shortcut
see -> http://support.microsoft.com/kb/278627

hth,
hector.
 
N

Neil Humphries

I've been there, done that, and it didn't work.

If I just type the shortcut name as "Shortcut to Mytemplate.dotm" I get a
file not found error.

If I type the shortcut name as "Shortcut to Mytemplate.dotm.lnk" it opens
the template file for editting, not a new document based on the template.

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

Héctor Miguel

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

Neil Humphries

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

jason rle

Easiest way to writing data to word using c#, I use it long time, name Spire.Doc, may help to you.
<a href=http://www.e-iceblue.com/Introduce/word-for-net-introduce.html>Spire.Doc</a>



Neil Humphries wrote:

Hyperlink opens word template for editting, not as new document
28-Jan-10

I have created hyperlinks to Word documents and templates in Excel. Clickin
the hyperlinks causes the templates to open in Word for editting. I need t
have the templates open new documents based on the templates. How can I d
this?

Previous Posts In This Thread:

Hyperlink opens word template for editting, not as new document
I have created hyperlinks to Word documents and templates in Excel. Clickin
the hyperlinks causes the templates to open in Word for editting. I need t
have the templates open new documents based on the templates. How can I d
this?

hi, Neil !
hi, Neil

create shortcuts (.lnk) to the template document and hyperlink to that shortcu
see -> http://support.microsoft.com/kb/27862

hth
hector.

I have been there, done that, and it did not work.
I have been there, done that, and it did not work

If I just type the shortcut name as "Shortcut to Mytemplate.dotm" I get
file not found error

If I type the shortcut name as "Shortcut to Mytemplate.dotm.lnk" it open
the template file for editting, not a new document based on the template

I am using Excel as a menu for 100 users so they do not have to know wher
the files and templates are kept on the server

:

hi, Neil !perhaps using (protected) code ?
hi, Neil

perhaps using (protected) code ?..

Sub NewDocTemplateBased(
With CreateObject("word.application"
..Documents.Add
Template:="Location To Your\Template Name.dot",
NewTemplate:=False, DocumentType:=
..Visible = Tru
End Wit
End Su

hth
hector.


Submitted via EggHeadCafe - Software Developer Portal of Choice
Make The WebClient Class follow redirects and get Target Url
http://www.eggheadcafe.com/tutorial...lass-follow-redirects-and-get-target-url.aspx
 
J

jason rle

Easiest way to writing data to word using c#, I use it long time, name Spire.Doc, may help to you.

Sorry I forgot the URL.

http://www.e-iceblue.com/Introduce/word-for-net-introduce.html



Neil Humphries wrote:

Hyperlink opens word template for editting, not as new document
28-Jan-10

I have created hyperlinks to Word documents and templates in Excel. Clickin
the hyperlinks causes the templates to open in Word for editting. I need t
have the templates open new documents based on the templates. How can I d
this?

Previous Posts In This Thread:

Hyperlink opens word template for editting, not as new document
I have created hyperlinks to Word documents and templates in Excel. Clickin
the hyperlinks causes the templates to open in Word for editting. I need t
have the templates open new documents based on the templates. How can I d
this?

hi, Neil !
hi, Neil

create shortcuts (.lnk) to the template document and hyperlink to that shortcu
see -> http://support.microsoft.com/kb/27862

hth
hector.

I have been there, done that, and it did not work.
I have been there, done that, and it did not work

If I just type the shortcut name as "Shortcut to Mytemplate.dotm" I get
file not found error

If I type the shortcut name as "Shortcut to Mytemplate.dotm.lnk" it open
the template file for editting, not a new document based on the template

I am using Excel as a menu for 100 users so they do not have to know wher
the files and templates are kept on the server

:

hi, Neil !perhaps using (protected) code ?
hi, Neil

perhaps using (protected) code ?..

Sub NewDocTemplateBased(
With CreateObject("word.application"
..Documents.Add
Template:="Location To Your\Template Name.dot",
NewTemplate:=False, DocumentType:=
..Visible = Tru
End Wit
End Su

hth
hector.

suggest
Easiest way to writing data to word using c#, I use it long time, name Spire.Doc, may help to you.
<a href=http://www.e-iceblue.com/Introduce/word-for-net-introduce.html>Spire.Doc</a>


Submitted via EggHeadCafe - Software Developer Portal of Choice
AJAX Web Service Driven Customers Table With Customer Details
http://www.eggheadcafe.com/tutorial...en-customers-table-with-customer-details.aspx
 
B

Bert Van Valckenborgh

Hi,
the solution with the shortcut works great when you're using it in an internet browser. I used it in Sharepoint and reporting services too.
Offcourse when people export the reports to excel, I got the same effort.
My solution?
I create a shortcut to internet explorer and I put as parameter the shortcut to the template of word.

Something like this:
...<server adrres>\SHORTCUTS\Launch_IE_With_Template.lnk

The command to launch the IE looks like this:
"<path IE>\IEXPLORE.EXE" "<network path>\SHORTCUTS\ShortcutToTemplate.lnk"

And this finally works in my report as well as in the exported excel.

greetz 2 @ll

Submitted via EggHeadCafe - Software Developer Portal of Choice
Custom Favorites Web Site with MongoDb and NoRM
http://www.eggheadcafe.com/tutorial...favorites-web-site-with-mongodb-and-norm.aspx
 

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