Re: Form Question -
From: Cindy M -WordMVP- (C.Meister-C_at_hispeed.ch)
Date: 12/08/04
- Next message: Cindy M -WordMVP-: "Re: Editing links to excel in form-protected word document"
- Previous message: Cindy M -WordMVP-: "Re: web page wizard"
- In reply to: LoriM: "Form Question -"
- Next in thread: Charles Kenyon: "Re: Form Question -"
- Reply: Charles Kenyon: "Re: Form Question -"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 08 Dec 2004 15:45:15 +0100
Hi =?Utf-8?B?TG9yaU0=?=,
> I need to create an "account profile" form where the first page (account #1)
> has fields to enter the required information (account name, etc.) and some
> fields will be drop-down lists. When I have finished filling in the
> information for account #1, I need to do a page break and then have the same
> form ready to be filled in for account #2. One document needs to be ready to
> handle 10 or more account profiles (1 to a page).
>
> This needs to be done in Word or Excel only, unfortunately no Access :-(
>
Generally, I'd
- set up the entire form and test it, until I know it's perfect
- insert a page break at the top
- select all and create an AutoText entry, SAVED IN THE TEMPLATE for this
form (not in Normal.dot)
- remove the pagebreak and protect the form
- now you need a macro that unprotects the form, inserts the AutoText entry
at the end of the document, then reprotects the form without losing user input.
Roughly, it would look like this:
Sub InsertAutoTextInForm()
Dim doc As Word.Document
Dim rng As Word.Range
Set doc = ActiveDocument
Set rng = doc.Range
rng.Collapse wdCollapseEnd
If doc.ProtectionType <> wdNoProtection Then
doc.Unprotect
End If
doc.AttachedTemplate.AutoTextEntries( _
"NameOfEntry").Insert rng, True
doc.Protect wdAllowOnlyFormFields, True
End Sub
You'd need to substitute the name of your AutoText entry for NameOfEntry,
above.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
- Next message: Cindy M -WordMVP-: "Re: Editing links to excel in form-protected word document"
- Previous message: Cindy M -WordMVP-: "Re: web page wizard"
- In reply to: LoriM: "Form Question -"
- Next in thread: Charles Kenyon: "Re: Form Question -"
- Reply: Charles Kenyon: "Re: Form Question -"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|