#1   Report Post  
LoriM
 
Posts: n/a
Default Form Question -

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 :-(
Any ideas are greatly appreciated!
  #2   Report Post  
BobT
 
Posts: n/a
Default

I would suggest creating a one page form with a "Post" (or Save or something
like that) button on the bottom of the page. That button then writes the
field values to a data file and puts the focus back on the first page.

OR

Create a form in VBA within Word/Excel and have the form post the
information back into the document/spreadsheet.

Bob Tulk
MOUS(XP/97)

"LoriM" wrote:

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 :-(
Any ideas are greatly appreciated!

  #3   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?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 :-)

  #4   Report Post  
Charles Kenyon
 
Posts: n/a
Default

Note that if you have any Ref or calculation fields that rely on your
formfields they will be changed when you insert the AutoText entry which
will redefine the bookmarks. If this is the case, you may need to select
your entire document (or at least the current page) and either lock or
unlink the fields. (This would be done while the document is unprotected.)

The following amendment does this (but unlinks all fields in the body of the
document). The poster may need something that only targets particular fields
but this is quick and dirty and works. It is only necessary if the
information in a form field is used in another field.

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.Fields.Unlink
doc.AttachedTemplate.AutoTextEntries( _
"ATTest").Insert rng, True
doc.Protect wdAllowOnlyFormFields, True
End Sub

The following macro updates only Ref fields. It could be called by the
insertion module prior to insertion of the AutoText and the command could be
changed to unlink.

Sub RefFieldUpdateAllStory()
' Written by Charles Kyle Kenyon 15 November 2001
' All Story Field Updater - Ref fields
Dim oField As Field
Dim oStory As Range
On Error Resume Next
For Each oStory In ActiveDocument.StoryRanges
' This goes into headers and footers as well as the regular document
For Each oField In ActiveDocument.Range.Fields
If oField.Type = wdFieldRef Then
oField.Update
End If
Next oField
Next oStory
End Sub

If a different kind of field is being used to reflect the data in the
formfields, that field type could be specified instead. I guess one other
change I would make to your (excellent) recommendations would be to change
the paragraph formatting of the first paragraph of the AutoText entry to
page break before rather than inserting a manual page break.

This may be more than the original poster needs or wants. If so, I
apologize.
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"Cindy M -WordMVP-" wrote in message
news:VA.0000a427.007a6e1a@speedy...
Hi ?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 :-)



  #5   Report Post  
LoriM
 
Posts: n/a
Default

Thanks so much to all of you for your help. I ended up creating it in Excel.
I appreciate all your comments!
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My help text does show on my form....why? Sherri Microsoft Word Help 4 December 7th 04 10:50 PM
Text Form Field Ref in Footer Won't Update on Screen StarWine Microsoft Word Help 3 December 6th 04 06:17 PM
Form Field Automation Mitch Microsoft Word Help 2 November 29th 04 07:29 PM
F11 in protected form chrisbliss Microsoft Word Help 1 November 28th 04 11:38 PM
Getting Web Form Results Blitzen Microsoft Word Help 0 November 28th 04 04:55 AM


All times are GMT +1. The time now is 11:31 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"