Reply
 
Thread Tools Display Modes
  #1   Report Post  
Will Goldring
 
Posts: n/a
Default How to save form fields

Anyone know how to retrieve form fields from a word doc
that's been opened by visual basic? I want to grab them
when the doc is closed (preferably), then write them to
an Access database.
  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi Will,

Anyone know how to retrieve form fields from a word doc
that's been opened by visual basic? I want to grab them
when the doc is closed (preferably), then write them to
an Access database.

No way to extract form field information from a closed Word
document; you'd have to open it. Or the user would have had
to save the document as "data only".

In the opened form document you extract the form field
result:
doc.FormFields(index).Result

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

  #3   Report Post  
Will Goldring
 
Posts: n/a
Default

Hi Cindy-
What I meant was how do I grab the field data UPON
closure of the document - not when the doc is already
closed. Also, how can I save the document as "data only"?

-----Original Message-----
Hi Will,

Anyone know how to retrieve form fields from a word

doc
that's been opened by visual basic? I want to grab them
when the doc is closed (preferably), then write them

to
an Access database.

No way to extract form field information from a closed

Word
document; you'd have to open it. Or the user would have

had
to save the document as "data only".

In the opened form document you extract the form field
result:
doc.FormFields(index).Result

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  
Suzanne S. Barnhill
 
Posts: n/a
Default

"Save data only for forms" is a document option on the Save tab of Tools |
Options. Set this property on your forms template, and it will apply to all
documents based on it.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Will Goldring" wrote in message
...
Hi Cindy-
What I meant was how do I grab the field data UPON
closure of the document - not when the doc is already
closed. Also, how can I save the document as "data only"?

-----Original Message-----
Hi Will,

Anyone know how to retrieve form fields from a word

doc
that's been opened by visual basic? I want to grab them
when the doc is closed (preferably), then write them

to
an Access database.

No way to extract form field information from a closed

Word
document; you'd have to open it. Or the user would have

had
to save the document as "data only".

In the opened form document you extract the form field
result:
doc.FormFields(index).Result

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  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi Will,

What I meant was how do I grab the field data UPON
closure of the document

If you have the choice of using a macro saved in the
document, or its template, then use a macro named FileClose
(will fire when the document is closed).

Otherwise, if you're automating this from outside of Word,
you'd need to link up to the Document_Close event on the
document object variable.

For more help you should really be in one of the word.vba
or possibly office.developer newsgroups. This is a group
for end-user questions (as you'd have noticed if you'd read
a few messages before posting).

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

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
Save As...*.txt files Scribe Microsoft Word Help 2 December 13th 04 04:45 AM
spell check form fields GIF Microsoft Word Help 2 December 8th 04 08:33 PM
Linking dropdown form fields obiesugar Microsoft Word Help 1 December 7th 04 07:50 PM
Text boxes in protected Doc, form fields BP522 Microsoft Word Help 5 December 3rd 04 07:55 PM
On a form in Word, the text in the fields comes out red, and a bo. MissMaia Microsoft Word Help 1 November 26th 04 10:54 AM


All times are GMT +1. The time now is 06:31 AM.

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"