equation problem

K

keith kuan

First of all, i need to say a big thanks for Charles Kenyon's help... i will try his suggestion as soon as possible..
now i have another even more tricky question to ask..

Dim displayText as strin
displayText = "EQ \o(\s \up " 5 "(" abc ")," xyz ")

is it possible to set "abc" to one font, and "xyz" to another font

thanks! ^O^
 
J

Jay Freedman

Hi, Keith,

There's no way to associate a font with anything in a VBA string
variable, because the string consists only of a sequence of character
numbers. You have to insert the string into a document, then select
(or set a Range object to) each piece and set its font there.

Since what you've shown us is obviously a field code, be aware that
once the field is in the document, you have to ensure that field codes
are visible before you try to select the characters inside. Use
ActiveWindow.View.ShowFieldCodes = True to do that. When you're done,
set it to False and do an ActiveDocument.Fields.Update.
 

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