Copy of pages with comboboxes

F

freili

I don't know very much about programming in VBA. What i did is a form witch
use comboxes on one page, and this is working fine. The page is used to
define the status of a machine.
Now my problem, the users of this page have to copy the page for each new
machine, and on each new page the combobox entries should be the same again.
Is this possible to do?

Thanks for your help
 
G

Graham Mayor

Save the form as a template and create new documents from the template.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
F

freili

Thanks for your answer, that i tried before,. That i want is, that alle the
pages are in one document at the ending. Is this possible?

Graham Mayor skrev:
 
G

Graham Mayor

It is not so straightforward to duplicate a raft of fields to form an
additional document page, for the simple reason that form field bookmark
names must be unique, so while it is simple enough to duplicate the fields
themselves on a new page, they may not behave as you might expect -
especially if they have macros or cross references relating to them,

If they are only for display you could unlock the form and save the whole
page as an autotext entry called (say) Form. You can then relock the form
and insert the autotext entry with a macro attached to a custom toolbar
button in the form template. The macro calls the autotext from the normal
template, but it could just as simply call it from the form template.

Dim bProtected As Boolean
If ActiveDocument.ProtectionType <> wdNoProtection Then
bProtected = True
ActiveDocument.Unprotect Password:=""
End If

Selection.EndKey Unit:=wdStory
NormalTemplate.AutoTextEntries("Form").Insert Where:=Selection.Range, _
RichText:=True

If bProtected = True Then
ActiveDocument.Protect _
Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
End If

If you are creating a lot of similar documents then you might consider
storing the data in a table or Excel file and using mail merge to create
your document - replacing the form fields with the mergefields that reflect
your data source.

OR

You could do as I suggested earlier and create a new document for each entry
using the template and then collate the data if you want it all in a
report - eg see http://gregmaxey.mvps.org/Extract_Form_Data.htm


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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