automating the docoument

M

msw

I write a lot of agreement and most of the time I just have to change couple
information name, address, date, etc.... I use the same file.

Is there a way I can create something will help me every time I open the
file to automaticly jump to the location of the area where the information
need to be entered.

from what I need I need to ceate something called a templetes. but is there
any information on how I make the templets to ask for the information
without writing any macros.

Any ideas will be appreciated.

Thank You
 
G

Greg Maxey

msw,

Using the same file is usually not a good idea. Create a template.

A User Form is best suited for your purposes but as you want to avoid macors
I will offer an alternative. If you change your mind, see:
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm to get you started.

You can use ASK fields and REF fields for your purposes. I would procede as
follows:

1. Open the document you use routinely and save it as template (e.g.,
Standard Agreement.dot)
2. Open (don't double click it) Standard Agreement.dot
3. For each standard data element (e.g., name, date, etc.) enter an ASK
field at the very begining of the document. ASK fields are entered using
CTRL+F9 to insert field brackets. The following is an example of an ASK
field that will prompt and ask for the customers name:

{ ASK CustomerName "Enter the customers name." }. Here I picked
CustomerName as the bookmark name for the REF field we will discuss next.

4. Go to the place in the document where you want the customers name to
appear.
5. Enter the following REF field again using CTRL+F9:

{ REF CustomerName }
6. Repeat steps 4 and 5 at each location you want the customer name to
appear.
7. You should have the hang of it now.
8. When you have all of your ASK and REF fields inserted, save the template
file.

Now when you want to create a new agreement file use the Standard
Agreement.dot template.

When the new document is created, you will need to hit CTRL+a to select all
then F9 to update fields. The ASK field prompts will now appear in the
order you inserted them.

If you want this automated, you will have to use a macro. Here is the code:

Sub AutoNew()
'Updates All Fields in Active Document
'Created by Graham Mayor
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType <> wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing
End Sub

See:
http://www.gmayor.com/installing_macro.htm
 
J

Jay Freedman

Read this series of articles:

Please Fill Out This Form
Part 1: Create professional looking forms in Word
http://www.computorcompanion.com/LPMArticle.asp?ID=22

Part 2: Adding Automation to your Word forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=46

Part 3: Learn more VBA (macros) to automate your forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=119

Part 4: Use custom dialog boxes in your Word forms
http://www.computorcompanion.com/LPMArticle.asp?ID=127

Part 5: Connect your AutoForm to a database to save input time and
keep better records!
http://www.computorcompanion.com/LPMArticle.asp?ID=136
 

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