FORMS

G

GASHD1889

I HAVE MADE A FORM WHICH WILL BE DISTRIBUTED TO OTHER PEOPLE. IS IT POSSIBLE
TO ADD A COMMAND TO A FORM THAT WILL SAVE THE FORM BASED UPON THE INFORMATION
ENTERED INTO THE FORM.
 
D

Doug Robbins

If we are talking about formfields as used in a protected document, you can
use the .Result property of a formfield to retrieve information that is
entered into the formfield and a macro run on exit from a field could use
the ActiveDocument.SaveAs command to save the document with information
retrieved in that way.

See
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


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
G

GASHD1889

Thanks doug,

But it is not really what i am looking for.

I have created a form which a user completes. One of the fields is an
individuals name.

At the end of the form I want a command button that when pressed will save
the file to a particular path name and name it based on the information
entered in the individuals name.

I am sure this can be done with VBA, but my knowledge of this is small

Thanks
 
D

Doug Robbins

Just what type of form is it? A userform (custom dialog) or a protected
document that uses formfields?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
G

GASHD1889

Protected document that uses formfields. I have written an
ActiveDocument.SaveAs command but do not know how to look up the form field.
How does the .result property work?
 
J

Jay Freedman

Open the Properties dialog of the formfield that gets filled with the
individual's name. The "Bookmark" box in that dialog contains the name
of the field, by default "Text1" or some other number. You can change
this to a more descriptive name, or use it as is.

In your code, the content of the "Text1" field is accessed by

MyString = ActiveDocument.FormFields("Text1").Result
 
G

GASHD1889

Jay,

Thanks exactly what I wanted



Jay Freedman said:
Open the Properties dialog of the formfield that gets filled with the
individual's name. The "Bookmark" box in that dialog contains the name
of the field, by default "Text1" or some other number. You can change
this to a more descriptive name, or use it as is.

In your code, the content of the "Text1" field is accessed by

MyString = ActiveDocument.FormFields("Text1").Result
 

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