I have a template with the following hidden reference field.

{ ASK MyField \* MergeFormat}

I use a {REF MyField \*MergeFormat} statement within my document to pull the
data where it needs to go. I have a macro that Selects ALL and then saves
all reference fields as regular text before the document is distributed
online. However, I would like to restore the ASK statements at the top of
the document in case further edits are needed.

So, what I would like to know is how to create a macro that automatically
inserts the ASK statement at the beginning of a document.

Thanks so much for any guidance with Word 2000 fields!!!

Re: Need to Add reference fields to a blank document by Doug

Doug
Sun May 11 14:49:24 PDT 2008

If you use the following code, in place of what you are now using, it will
only unlink the Ref fields.

Dim afield As Field
For Each afield In ActiveDocument.Fields
If afield.Type = wdFieldRef Then
afield.Unlink
End If
Next afield

Note, it may be better to Lock them rather than to unlink them as then if
you enter some new data into the Ask field, you could unlock the Ref fields
and have them update if required.

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

"PiaD" <PiaD@discussions.microsoft.com> wrote in message
news:9BA4E8A2-E916-447C-B1B1-EC6111BFC73F@microsoft.com...
>I have a template with the following hidden reference field.
>
> { ASK MyField \* MergeFormat}
>
> I use a {REF MyField \*MergeFormat} statement within my document to pull
> the
> data where it needs to go. I have a macro that Selects ALL and then saves
> all reference fields as regular text before the document is distributed
> online. However, I would like to restore the ASK statements at the top of
> the document in case further edits are needed.
>
> So, what I would like to know is how to create a macro that automatically
> inserts the ASK statement at the beginning of a document.
>
> Thanks so much for any guidance with Word 2000 fields!!!



RE: Need to Add reference fields to a blank document by PiaD

PiaD
Sun May 11 17:50:00 PDT 2008

This works better for me than what I had. Thank you!

"PiaD" wrote:

> I have a template with the following hidden reference field.
>
> { ASK MyField \* MergeFormat}
>
> I use a {REF MyField \*MergeFormat} statement within my document to pull the
> data where it needs to go. I have a macro that Selects ALL and then saves
> all reference fields as regular text before the document is distributed
> online. However, I would like to restore the ASK statements at the top of
> the document in case further edits are needed.
>
> So, what I would like to know is how to create a macro that automatically
> inserts the ASK statement at the beginning of a document.
>
> Thanks so much for any guidance with Word 2000 fields!!!