Asking for template while opening word document

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a requirement to open MS-word with specified template. It is required to be made mandetory to prompt for template (user defined template) before opening MS-word. This is required for all ways when word is initiated (thru winword.exe or thru shortcuts or 'Start'-'Run'-Winword or 'Start'-'Program'-'MSword').

At the moment it is opening only with NORMAL.DOT.

Thanks in advance,
K. Rajasekar
 
Is this template merely customizations in the way of toolbars, macros, etc.?
If so, you can place the template file in a network folder and set each
computer's "Startup" file location path to that folder (Tools", "Options",
"File Locations" TAB, highlight "Startup" path, click "Modify" button).

If this is a specific file that MUST be opened (i.e., including text, etc.)
when Word is opened, I guess it can be renamed to "normal.dot" and placed in
the specified folder. Not really a good idea, but can be done. Of course,
you could just put a shortcut on each Desktop to the template and "train"
every one to not open Word any other way! My philosophy has never been to
"Build a bigger fence, but to teach them not to climb the fence"!

Bill Foley
www.pttinc.com
K. Rajasekar said:
Hi,

I have a requirement to open MS-word with specified template. It is
required to be made mandetory to prompt for template (user defined template)
before opening MS-word. This is required for all ways when word is
initiated (thru winword.exe or thru shortcuts or 'Start'-'Run'-Winword or
'Start'-'Program'-'MSword').
 
Thanks....
Sorry if I was not clear in mentioning the same..
The main aim of mine is to 'ask / prompt' for template while opening MS-word. For example, I have 5 templates (store in ...template folder) and would(have) like to use only any of these 5 templates when I am working in word. So while opening word, it should prompt for these 5 templates and I will select any of of them

Going forward I would like to write macro (creating few buttons) in all those templates

Regards
K. Rajasekar
 
Try this to see whether it meets your needs: Create a new desktop shortcut
to the Winword.exe executable. Right-click the shortcut icon and select
Properties. In the Target field, add the switch /mFileNew to the end of the
path, so it looks like this (depending on exactly where Winword is
installed):

"C:\Program Files\Microsoft Office\Office\WINWORD.EXE" /mFileNew

That should display the File > New dialog to let you choose your template.
 
You could add the /n switch to have Word open without a blank document. An
AutoExec macro in Normal.dot could be used to open the File New dialog (in
which your templates are available) or to present a UserForm that would
allow users to choose one of the templates and create a new document. Either
of these options would require some VBA expertise. Whatever method you
choose, you'll want to remove the New button from the toolbar (which creates
a new document based on Normal.dot) and substitute a New... button (to open
the File New dialog).

....I've just read Jay's subsequent post, and of course it would work better
for presenting the File New dialog. But my UserForm suggestion stands.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

K. Rajasekar said:
Thanks.....
Sorry if I was not clear in mentioning the same...
The main aim of mine is to 'ask / prompt' for template while opening
MS-word. For example, I have 5 templates (store in ...template folder) and
would(have) like to use only any of these 5 templates when I am working in
word. So while opening word, it should prompt for these 5 templates and I
will select any of of them.
 
You are trying to reinvent the wheel. Put your templates in the user
template folder, uninstall any other templates that you are not intending to
use and add the following macro to normal.dot

Sub AutoExec()
Dialogs(wdDialogFileNew).Show
End Sub

This will pop up the templates folder when you start Word to display your
choice of template - though frankly File > new does the job just as well!

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
E-mail (e-mail address removed)
Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
Merry Christmas!!

Thanks for all for the responses. The solutions are some what satisfying the requirement. Especially Graham's suggestion works out well.

The ultimate aim of mine is to

1. 'insist' myself to select a predefined template (I have 9 templates and I have to restrict myself to work ONLY on any of those templates. The templats are nothing but having few words in the footer to catogries the type of document - before opening a document. With AutoExe() macro, it is working fine but on 'cancel' in that dialog box, word opens a default page

2. While saving the document (includes all save techniques - Ctrl+S, File-Save, File-SaveAs, AutoSave etc.) should check for the documents footer. It should check whether the document is having footer (eg. Personal, official, etc - like this I have 9 categories). It should allow saving only when the footer is having any one of those text or else without saving the document, it should show an error message

Point No.1 can be implemented in some other way too. Like, while opening a word application, throw a dialog box where the 9 footer information (only the text information) can be listed (in a combo box - pull down selection bar) from there I need to select a footer text which should appear in the opened document as footer. Without selecting this I should be allowed to get into word

It would be very helpful if the relevant macros are provided

(I have placed this as a fresh query as well

Regards
K. Rajaseka


----- Graham Mayor wrote: ----

You are trying to reinvent the wheel. Put your templates in the use
template folder, uninstall any other templates that you are not intending t
use and add the following macro to normal.do

Sub AutoExec(
Dialogs(wdDialogFileNew).Sho
End Su

This will pop up the templates folder when you start Word to display you
choice of template - though frankly File > new does the job just as well

--
<>><><<>><<><>><><<><>><<>><><<
Graham Mayor - Word MV
E-mail (e-mail address removed)
Web site www.gmayor.co
Word MVP web site www.mvps.org/wor
<>><><<>><<><>><><<><>><<>><><<

K. Rajasekar wrote
 
K. Rajasekar said:
Merry Christmas!!!

Thanks for all for the responses. The solutions are some what
satisfying the requirement. Especially Graham's suggestion works out
well.

The ultimate aim of mine is to

1. 'insist' myself to select a predefined template (I have 9
templates and I have to restrict myself to work ONLY on any of those
templates. The templats are nothing but having few words in the
footer to catogries the type of document - before opening a
document. With AutoExe() macro, it is working fine but on 'cancel'
in that dialog box, word opens a default page.

Word will not work without the default template, so you cannot lose that
one. It is also inadvisable to have a footer saved in the normal template as
it can have unwanted knock-on effects elsewhere e.g. when producing labels.
And yes, if you choose not to open a preferrred template, you will get the
default template. Frankly I can't see what is so difficult about choosing
(say) a letter head template when you want to write a letter; or a memo
template when you want to write a memo etc.
2. While saving the document (includes all save techniques - Ctrl+S,
File-Save, File-SaveAs, AutoSave etc.) should check for the documents
footer. It should check whether the document is having footer (eg.
Personal, official, etc - like this I have 9 categories). It should
allow saving only when the footer is having any one of those text or
else without saving the document, it should show an error message.

If your footer is in the document template, then why do you need to check
that it is still present when you save the document?
Point No.1 can be implemented in some other way too. Like, while
opening a word application, throw a dialog box where the 9 footer
information (only the text information) can be listed (in a combo box
- pull down selection bar) from there I need to select a footer text
which should appear in the opened document as footer. Without
selecting this I should be allowed to get into word.
It would be very helpful if the relevant macros are provided.

You could employ a user form that enables you to pick from a list of footers
and enters the chosen footer into the document, popped up from an autoexec
macro - see http://www.mvps.org/word/FAQs/Userforms.htm
(I have placed this as a fresh query as well)

Don't do that!!!! It will irritate the hell out of the contributors to these
groups. Keep your questions in this thread.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP
E-mail (e-mail address removed)
Web site www.gmayor.com
Word MVP web site www.mvps.org/word
 
Back
Top