issue with opening a file

A

Associates

Hi,

I have a question i need to ask of you MVP experts. Say, i have a several
customised templates dot files e.g. our company Letter template, Fax
template, and so on. Each of these templates have a userform (macro -
autonew) that would be called up as soon as a user opens up the template

My question is if i have a customised toolbar that has buttons for each of
these templates in the normal.dot. So when user opens up a word document,
he/she will find the toolbar. On the dropdown list, there are "Company
Letter", "Company Fax", "Company Report". When they click on Company Letter,
it brings up the Letter doc with the userform pops up waiting for user
inputs. That's the idea.

Today, i tried to do that but it actually opens up the template Letter.dot.
Hence, there is no userform showing up. This is not what i anticipated.

Here is my code for testing purpose only
Sub Macro1()

Documents.Open FileName:="C:\Documents and Settings\myComp\Application
Data\Microsoft\Templates\Company Letter.dot", ReadOnly:=True

End Sub

I might have used the wrong code here for opening a file.

Your ideas would be greatly appreciated.

Thank you in advance
 
D

Doug Robbins - Word MVP

Use Documents.Add "C:\Documents and Settings\myComp\Application _
Data\Microsoft\Templates\Company Letter.dot"

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
A

Associates

Thank you Doug. It works.

Doug Robbins - Word MVP said:
Use Documents.Add "C:\Documents and Settings\myComp\Application _
Data\Microsoft\Templates\Company Letter.dot"

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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