Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
expect_ed expect_ed is offline
external usenet poster
 
Posts: 3
Default Reading Field Forms w/ Blank Bookmarks

My office has several hundred copies of a Word form that has been populated
over the past year as a way of tracking individual projects. Each form has a
couple dozen fields, most of which have bookmarks but a few which have the
bookmark field blank. I would like to retrieve and consolidate the data in
the fields and I found Greg Maxey's macro to do this into Access. Is it
possible to do this for the form fields that do not have a bookmark valule?
Thanks in advance for any help.
ed
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Reading Field Forms w/ Blank Bookmarks

Hi expect_ed,

Provided all the documents have the same layout and number of formfields (ie there's no gaps in or extras added to the set of
fields), you can extract the data by simply iterating through the formfield collection. You don't need to know the bookmark names
unless you're after a particular formfield and you don't want to have to remember its position in the document. For example:

Sub Demo()
Dim oFld As FormField
With ActiveDocument
For Each oFld In .FormFields
MsgBox oFld.Result
Next oFld
End With
End Sub

For checkbox formfields, the 'result' will be 1 (True) or 0 (False). Obviously, you'll need to replace the messagebox with the
relevant output code and call the above routine from whatever code you're using to loop through the documents.

--
Cheers
macropod
[Microsoft MVP - Word]


"expect_ed" wrote in message ...
My office has several hundred copies of a Word form that has been populated
over the past year as a way of tracking individual projects. Each form has a
couple dozen fields, most of which have bookmarks but a few which have the
bookmark field blank. I would like to retrieve and consolidate the data in
the fields and I found Greg Maxey's macro to do this into Access. Is it
possible to do this for the form fields that do not have a bookmark valule?
Thanks in advance for any help.
ed


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
expect_ed expect_ed is offline
external usenet poster
 
Posts: 3
Default Reading Field Forms w/ Blank Bookmarks

Thanks, this is a big help.
Only problem is, if the formfield is blank I get the error:

Run-time error '5825': Object has been deleted.

Seems I need some sort of error capturing/ignoring routine there but I have
no idea how to start setting one up.
Any help appreciated.
ed

"macropod" wrote:

Hi expect_ed,

Provided all the documents have the same layout and number of formfields (ie there's no gaps in or extras added to the set of
fields), you can extract the data by simply iterating through the formfield collection. You don't need to know the bookmark names
unless you're after a particular formfield and you don't want to have to remember its position in the document. For example:

Sub Demo()
Dim oFld As FormField
With ActiveDocument
For Each oFld In .FormFields
MsgBox oFld.Result
Next oFld
End With
End Sub

For checkbox formfields, the 'result' will be 1 (True) or 0 (False). Obviously, you'll need to replace the messagebox with the
relevant output code and call the above routine from whatever code you're using to loop through the documents.

--
Cheers
macropod
[Microsoft MVP - Word]


"expect_ed" wrote in message ...
My office has several hundred copies of a Word form that has been populated
over the past year as a way of tracking individual projects. Each form has a
couple dozen fields, most of which have bookmarks but a few which have the
bookmark field blank. I would like to retrieve and consolidate the data in
the fields and I found Greg Maxey's macro to do this into Access. Is it
possible to do this for the form fields that do not have a bookmark valule?
Thanks in advance for any help.
ed



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Reading Field Forms w/ Blank Bookmarks

Hi expect_ed,

I'm unable to reproduce that behaviour, even if the formfield is blank. What type of formfield? Is it located in a textbox, table or
a normal paragraph?

--
Cheers
macropod
[Microsoft MVP - Word]


"expect_ed" wrote in message ...
Thanks, this is a big help.
Only problem is, if the formfield is blank I get the error:

Run-time error '5825': Object has been deleted.

Seems I need some sort of error capturing/ignoring routine there but I have
no idea how to start setting one up.
Any help appreciated.
ed

"macropod" wrote:

Hi expect_ed,

Provided all the documents have the same layout and number of formfields (ie there's no gaps in or extras added to the set of
fields), you can extract the data by simply iterating through the formfield collection. You don't need to know the bookmark names
unless you're after a particular formfield and you don't want to have to remember its position in the document. For example:

Sub Demo()
Dim oFld As FormField
With ActiveDocument
For Each oFld In .FormFields
MsgBox oFld.Result
Next oFld
End With
End Sub

For checkbox formfields, the 'result' will be 1 (True) or 0 (False). Obviously, you'll need to replace the messagebox with the
relevant output code and call the above routine from whatever code you're using to loop through the documents.

--
Cheers
macropod
[Microsoft MVP - Word]


"expect_ed" wrote in message ...
My office has several hundred copies of a Word form that has been populated
over the past year as a way of tracking individual projects. Each form has a
couple dozen fields, most of which have bookmarks but a few which have the
bookmark field blank. I would like to retrieve and consolidate the data in
the fields and I found Greg Maxey's macro to do this into Access. Is it
possible to do this for the form fields that do not have a bookmark valule?
Thanks in advance for any help.
ed




  #5   Report Post  
Posted to microsoft.public.word.docmanagement
expect_ed expect_ed is offline
external usenet poster
 
Posts: 3
Default Reading Field Forms w/ Blank Bookmarks

The one I happened to be a date field, or rather Text Form Field of type
Date. Unlimited length formatted MM/dd/yyyy and bookmarked as Text 24. What
is strange is that when viewing the form the field is only about the width of
a period. If I enter a date and then delete it I cannot get it to go back
to the same state. Rather it shows the normal circles of a more typical
entry field. Not sure how it got that way but I managed to work around it by
adding an "On Error Resume Next" command at the point between setting temp =
oFld.Result and Range("A2").Offset(x,y) = temp.
"macropod" wrote:

Hi expect_ed,

I'm unable to reproduce that behaviour, even if the formfield is blank. What type of formfield? Is it located in a textbox, table or
a normal paragraph?

--
Cheers
macropod
[Microsoft MVP - Word]


"expect_ed" wrote in message ...
Thanks, this is a big help.
Only problem is, if the formfield is blank I get the error:

Run-time error '5825': Object has been deleted.

Seems I need some sort of error capturing/ignoring routine there but I have
no idea how to start setting one up.
Any help appreciated.
ed

"macropod" wrote:

Hi expect_ed,

Provided all the documents have the same layout and number of formfields (ie there's no gaps in or extras added to the set of
fields), you can extract the data by simply iterating through the formfield collection. You don't need to know the bookmark names
unless you're after a particular formfield and you don't want to have to remember its position in the document. For example:

Sub Demo()
Dim oFld As FormField
With ActiveDocument
For Each oFld In .FormFields
MsgBox oFld.Result
Next oFld
End With
End Sub

For checkbox formfields, the 'result' will be 1 (True) or 0 (False). Obviously, you'll need to replace the messagebox with the
relevant output code and call the above routine from whatever code you're using to loop through the documents.

--
Cheers
macropod
[Microsoft MVP - Word]


"expect_ed" wrote in message ...
My office has several hundred copies of a Word form that has been populated
over the past year as a way of tracking individual projects. Each form has a
couple dozen fields, most of which have bookmarks but a few which have the
bookmark field blank. I would like to retrieve and consolidate the data in
the fields and I found Greg Maxey's macro to do this into Access. Is it
possible to do this for the form fields that do not have a bookmark valule?
Thanks in advance for any help.
ed






  #6   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Reading Field Forms w/ Blank Bookmarks

Hi expect_ed,

With 'On Error Resume Next', be aware that may mean the rest of the collected data will be offset by one position from where it
should be. Better to build in an error-handling routine that deals with the errors more gracefully than that.

--
Cheers
macropod
[Microsoft MVP - Word]


"expect_ed" wrote in message ...
The one I happened to be a date field, or rather Text Form Field of type
Date. Unlimited length formatted MM/dd/yyyy and bookmarked as Text 24. What
is strange is that when viewing the form the field is only about the width of
a period. If I enter a date and then delete it I cannot get it to go back
to the same state. Rather it shows the normal circles of a more typical
entry field. Not sure how it got that way but I managed to work around it by
adding an "On Error Resume Next" command at the point between setting temp =
oFld.Result and Range("A2").Offset(x,y) = temp.
"macropod" wrote:

Hi expect_ed,

I'm unable to reproduce that behaviour, even if the formfield is blank. What type of formfield? Is it located in a textbox, table
or
a normal paragraph?

--
Cheers
macropod
[Microsoft MVP - Word]


"expect_ed" wrote in message ...
Thanks, this is a big help.
Only problem is, if the formfield is blank I get the error:

Run-time error '5825': Object has been deleted.

Seems I need some sort of error capturing/ignoring routine there but I have
no idea how to start setting one up.
Any help appreciated.
ed

"macropod" wrote:

Hi expect_ed,

Provided all the documents have the same layout and number of formfields (ie there's no gaps in or extras added to the set of
fields), you can extract the data by simply iterating through the formfield collection. You don't need to know the bookmark
names
unless you're after a particular formfield and you don't want to have to remember its position in the document. For example:

Sub Demo()
Dim oFld As FormField
With ActiveDocument
For Each oFld In .FormFields
MsgBox oFld.Result
Next oFld
End With
End Sub

For checkbox formfields, the 'result' will be 1 (True) or 0 (False). Obviously, you'll need to replace the messagebox with the
relevant output code and call the above routine from whatever code you're using to loop through the documents.

--
Cheers
macropod
[Microsoft MVP - Word]


"expect_ed" wrote in message ...
My office has several hundred copies of a Word form that has been populated
over the past year as a way of tracking individual projects. Each form has a
couple dozen fields, most of which have bookmarks but a few which have the
bookmark field blank. I would like to retrieve and consolidate the data in
the fields and I found Greg Maxey's macro to do this into Access. Is it
possible to do this for the form fields that do not have a bookmark valule?
Thanks in advance for any help.
ed





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
user forms and bookmarks formtied Microsoft Word Help 1 February 22nd 08 11:01 PM
Reading data from form field Geter Microsoft Word Help 1 November 20th 07 03:49 PM
Forms Bookmarks If Statements DMc2004 Microsoft Word Help 0 October 16th 07 02:20 PM
print field data only for forms option prints a blank page Ken Microsoft Word Help 6 October 6th 05 10:05 PM
Supress the blank space from a blank data field? John Mailmerge 3 September 20th 05 04:31 PM


All times are GMT +1. The time now is 06:43 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"