S
singeredel
I have set up a bookmark called "ReferringPhysician" in a document as well as
a reference field {ReferringPhysician} to repeat the bookmark text at another
location in the document. The fields are updating fine.
Since I have a variety of different bookmarks and reference fields, I need
to know how to reference a specific reference field so that the particular
field and some surrounding punctuation can be deleted from the document if
the variable for the ReferringPhysician bookmark is blank or empty of text.
I think I have figured out how to format the text that appears in the
various fields to take on the default paragraph font, as follows:
Dim oFld As Field
For Each oFld In ActiveDocument.Fields
oFld.Result.Style = "Default Paragraph Font"
On Error Resume Next
Next
Is there any way to include in this code to delete the { ReferringPhysician
} field as well as the preceding comma and space and trailing comma. The text
would appear as follows in the template itself:
"Thank you, { ReferringPhysician}, for participating..."
If there is no variable information for the bookmark "ReferringPhysician", I
want the text in the document to look as follows:
"Thank you for participating..."
Thanks for any help!
a reference field {ReferringPhysician} to repeat the bookmark text at another
location in the document. The fields are updating fine.
Since I have a variety of different bookmarks and reference fields, I need
to know how to reference a specific reference field so that the particular
field and some surrounding punctuation can be deleted from the document if
the variable for the ReferringPhysician bookmark is blank or empty of text.
I think I have figured out how to format the text that appears in the
various fields to take on the default paragraph font, as follows:
Dim oFld As Field
For Each oFld In ActiveDocument.Fields
oFld.Result.Style = "Default Paragraph Font"
On Error Resume Next
Next
Is there any way to include in this code to delete the { ReferringPhysician
} field as well as the preceding comma and space and trailing comma. The text
would appear as follows in the template itself:
"Thank you, { ReferringPhysician}, for participating..."
If there is no variable information for the bookmark "ReferringPhysician", I
want the text in the document to look as follows:
"Thank you for participating..."
Thanks for any help!