Font Style

D

Debra Ann

When I am recording a macro of my keystrokes and I pick a certain font,
sometimes I get different code:

Selection.Style = ActiveDocument.Styles("Body Text ")
Selection.Style = ActiveDocument.Styles("Body Text Char")
Selection.Style = ActiveDocument.Styles("Body Text Char Char Char")

what is the "Char" part of the style. The reason I am asking is that I have
created a template and the template contains a toolbar button the changes the
font to body text. When I recorded my keystrokes in the template, I got

Selection.Style = ActiveDocument.Styles("Body Text Char")

and it worked fine when testing it. But later as people were adding
information into the template, sometimes an error comes up on this line of
code. When going back into the 140 documents that were created off this
template, sometimes it works and sometimes it doesn't. For the ones that
work, if I took the "char" out it wouldn't work and for the ones that didn't
work, if I took the "char" out it would work. See my dilema :-(

Please explain what the "char" is and is there a workaround to assign basic
body text style to the selected text in any situation.
 

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