styles

N

Nathan Franklin

Hello list,

I have a A range object in which i insert some text. What I need to be able
to do is put a portion of that text into italics.. How can I achieve this?

For Example i have a line of text "The quick brown fox jumped" so i insert
that into the range object, and then I have some more text "over the lazy
dog." Now i insert that into the range object as well, but I need that text
to be italic.. Im now sure how to achieve this..

ANy help would be great thanks very much

Nathan
 
C

Cindy M -WordMVP-

Hi Nathan,
I have a A range object in which i insert some text. What I need to be able
to do is put a portion of that text into italics.. How can I achieve this?

For Example i have a line of text "The quick brown fox jumped" so i insert
that into the range object, and then I have some more text "over the lazy
dog." Now i insert that into the range object as well, but I need that text
to be italic.. Im now sure how to achieve this..
Do it in pieces. Roughly:

Dim rng as Word.Range

Set rng = Selection.Range
rng.Text = "The quick brown fox jumped "
rng.Collapse wdCollapseEnd
rng.Text = "over the lazy dog"
rng.Font.Italic = true

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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