Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2003

Tip: Looking for answers? Try searching our database.

Make new document with templates, userform etc.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Raymond - 26 Nov 2003 20:21 GMT
Hi

I've a question about templates & userforms How to use them
when I want to make a new document

I've got a template that is called brief.dot en a document
tools.doc an I want to make a new document called brief001.doc

Tools.doc contains some user forms and modules. Brief.dot
contains some bookmarks. When I start brief.dot it must
open a user form in tools.doc. On that userform I've got
some textboxes, listboxes and buttons. One of buttons must
contain a statement that puts that values from the boxes
into the bookmarks in brief.dot and saves brief.dot as
brief001.doc.

Can anybody tell me if this is possible and when it is done
brief001.doc contains VBA program code?

Greetings

Raymond

By the way.

thanks for the aid rather ( post from R.L. and Raymond)
Jonathan West - 28 Nov 2003 12:29 GMT
Hi Raymond,

I would recmmend that you transfer the relevant userforms & macros from
tools.doc to brief.dot. This will simplify your task considerably.

When you say "when I start brief.dot" I assume you mean when you create a
new document based on brief.dot, either by selecting brief.dot in the File
New dialog, or by double-clicking on it in Windows Explorer.

Assuming that to be so, and you want the userform to be displayed when the
new document is created, then you create a macro called AutoNew in brief.dot
which calls the userform.

This article describes the process in detail

How to create a Userform
http://www.mvps.org/word/FAQs/Userforms/CreateAUserForm.htm

If you want the file saved under a specific name as soon as all the correct
information has been included in the document, then you use the SaveAs
command to force a save under a specific filename.

If you want to have the file saved as brief001.doc, and then the next one
saved as brief002.doc etc, then take a look at this article on how to do it.

Creating sequentially numbered documents (such as invoices)
http://www.mvps.org/word/FAQs/MacrosVBA/NumberDocs.htm

If you create a document based on the template in the way I have described,
then the VBA code is not included in the document.

Signature

Regards
Jonathan West - Word MVP
http://www.multilinker.com
Please reply to the newsgroup

> Hi
>
[quoted text clipped - 22 lines]
>
> thanks for the aid rather ( post from R.L. and Raymond)
- 29 Nov 2003 20:24 GMT
Thanks for the help

>-----Original Message-----
>Hi Raymond,
[quoted text clipped - 56 lines]
>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.