Excel to Word Font Size

  • Thread starter Thread starter John Wilson
  • Start date Start date
J

John Wilson

Hoping that someone has done this before.

Trying to populate a Word Bookmark with text from Excel.

This works:
Set wordRange = wordDoc.GoTo(What:=wdGoToBookmark, Name:="ltrA")
wordRange.InsertAfter "A"

Now what I'd like to do is set the font on the word document for this
bookmark
to bold. I know that I can have the bookmark in Word preformatted to
bold
but I'd rather be able to do it on-the-fly.
Is this possible?
Are there other formats that can be set, like Underline?

Thanks,
John
 
Peter,

That worked!!!!
I was trying this from the wrong angle by things like
Name:="ltrA", Font.Bold:=True
which obviously wasn't working.
After reading your reply, I realized that the
"Set wordRange =" already had me where I needed to be.

For the record, the following worked like a charm:

Set wordRange = wordDoc.GoTo(What:=wdGoToBookmark, Name:="ltrB")
wordRange.Characters(1).Font.Bold = True
wordRange.Characters(1).Font.Underline = True
wordRange.InsertAfter "B"

Thanks,
John
 
Back
Top