Re: Form Question -

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Cindy M -WordMVP- (C.Meister-C_at_hispeed.ch)
Date: 12/08/04


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



Relevant Pages

  • Re: sbs roaming profile not loading on local client
    ... Log on the server as an administrator. ... Repeat step 3 to step 5 to change the owner to the newly created account. ... supported in the private newsgroup and you may post to the public newsgroup ... Microsoft Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Re: Relaying denied from one PC only
    ... For the issue happens on one specific user account, ... can mail me the message tracking log and smtp log for analyze. ... Stop and restart the SMTP virtual server. ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Re: Logoff / Slow Bootups / Outlook attachements / Outlook Not res
    ... are going to be using two of the problematic machines. ... When you logon the problematic user account on the good user's computer, ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • RE: Problem logging into console on SBS2003
    ... I am sorry for the delay in responding due to weekend, ... If the user account belongs to these user groups or created by the Power ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • RE: Event ID 7000 WINS failed to start The system cannot find the
    ... I am getting another error in file replication service that might be related. ... > Thank you for posting in SBS newsgroup. ... > - The password is changed on the account the service is configured to use ... you may want to contact Microsoft CSS directly. ...
    (microsoft.public.windows.server.sbs)