Count Number of ASK fields

M

Michael

Hi Folks - We use many ASK fields in our Merge docs. As part of converting
the ASK fields to database fields, we need to know the number of ASK fields
per document. So, we are looking for a report that would list the file name
and ASK fields similar to this:

Affidavit.doc
ASK assigndate "Enter Assignment Date (Ex. July 14, 2008)"
ASK recordeddate "Enter Deed Recorded Date (Ex. July 14, 2008)"
ASK principal "Enter Loan Amount (Ex. $173,550.55)"

I figure this will need programming, but maybe there are some
non-programming techniques to accomplish this task. Any ideas?

Thanks.

Michael
 
D

Doug Robbins - Word MVP

The following code will produce such a report

Dim source as Document, target as Document
Dim af as Field
Set source = ActiveDocument
Set target = Documents.Add
target.Range.InsertAfter "The following ASK fields occur in " & source.Name
& vbCr
For each af in source.Fields
If af.Type = wdFieldAsk Then
target.Range.InsertAfter af.Code & vbCr
End If
Next

If you want to gather this information for a large number of documents, you
might be interested in the addins that you can get from fellow MVP Greg
Maxey's website at:

http://gregmaxey.mvps.org/Process_Batch_Folder.htm


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

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