Can't find SYMBOL fields

D

Dennis

When attempting to find the SYMBOL fields in a word doc
(using VB), I can't find them. The syntax I'm using is:

For Each myField In wordDoc.Fields
If myField.Type = wdFieldSymbol Then
MsgBox myField.Code.Text
End If
Next myField

wordDoc is the active document. It just returns zero, even
though I have multiple bullet-fields defined as:

{SYMBOL 63 \f"CommonBullets" \s 12}

My goal is to replace the code inside with:

"symbol 216 \f"Wingdings" \s 12"

But unless I can find the fields, I can't change the text.
Any help would be greatly appreciated.
 
R

Ravi

Hi Dennis,

Try with this code:


Dim fi As Field
For Each fi In ActiveDocument.Fields
If fi.Type = 57 Then
fi.Code.Text = Replace(fi.Code.Text & "", "SYMBOL 211
\f ""Symbol"" \s 12", "SYMBOL 216 \f ""Windings"" \s 12")
End If
Next


-Ravi
 
G

Guest

I ran a Word Perfect document through a program called
File Merlin, which translated it into Word. The
translation is fine, except the ">" in the "WP MathA" font
came across as a "?" in "CommonBullets" font (which I
don't have access to). In addition, I cannot find
any "real" FIELDS in the document, so ALT+F9 doesn't show
them. However, when I look with CrossEyes (a 3rd party DLL
for Word), I see:

{SYMBOL 63 \f"CommonBullets" \s 10}

So I should be able to change it, but cannot change nor
display it. Also, the FIELD property of the ActiveDocument
returns ZERO. (I have the Word doc available for review).

Thanks

Dennis
 
R

Ravi \(Newgen\)

Hi Dennis,

Using ^19 and ^21 in Find box we can find real field
codes. Let me know if you need more clarification.

-Ravi
 
D

Dennis

Neither of those codes generated a "hit". I'm not sure
what to make of this really.

Thanks for the assist.

Dennis
 

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