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

Re: issue with opening a file by Doug

Doug
Tue Apr 08 19:57:26 PDT 2008

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

"Associates" <Associates@discussions.microsoft.com> wrote in message
news:5ADE0FCA-595D-42D1-A5E1-464710BE1DBA@microsoft.com...
> 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
>



Re: issue with opening a file by Associates

Associates
Tue Apr 08 22:21:01 PDT 2008

Thank you Doug. It works.

"Doug Robbins - Word MVP" wrote:

> 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
>
> "Associates" <Associates@discussions.microsoft.com> wrote in message
> news:5ADE0FCA-595D-42D1-A5E1-464710BE1DBA@microsoft.com...
> > 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
> >
>
>
>