Word 2003
Access 2003

I'm creating the body of a document from a dot file. I need to bold a
sentence that comes between 2 others.


Set docWord = objWord.Documents.Add(Template:=sWordFormsPath & "LetRec.dot")

Dim rngWord As Word.Range

Set rngWord = docWord.Goto(What:=wdGoToBookmark, Name:="LetterBody")

rngWord.InsertAfter "We have enclosed a signed and notarized authorization
that allows us to receive this inforrmation on behalf of our client. "

>>> Need to turn bold ON here to bold the following sentence

rngWord.InsertAfter "If you would prefer payment in advance, kindly advise
and we shall remit same immediately. "

>>> Need to turn bold OFF here

rngWord.InsertAfter "Thank you for your anticipated cooperation."


I've tried a few things that don't seem to work. What code do I need to bold
that middle sentence?

Thanks,

Keith

Re: MS Access VBA - how to bold text? by Keith

Keith
Fri Jan 11 14:09:22 PST 2008

Here's the answer if anyone's interested:

with rngWord
.Collapse wdCollapseEnd
.InsertAfter "If you would prefer payment in advance, kindly..."
.Font.Bold = True
.Collapse wdCollapseEnd
.InsertAfter "Thank you for your anticipated cooperation."
.Font.Bold = False
end with

"Keith G Hicks" <krh@comcast.net> wrote in message
news:#uEHplHVIHA.4364@TK2MSFTNGP02.phx.gbl...
> Word 2003
> Access 2003
>
> I'm creating the body of a document from a dot file. I need to bold a
> sentence that comes between 2 others.
>
>
> Set docWord = objWord.Documents.Add(Template:=sWordFormsPath &
"LetRec.dot")
>
> Dim rngWord As Word.Range
>
> Set rngWord = docWord.Goto(What:=wdGoToBookmark, Name:="LetterBody")
>
> rngWord.InsertAfter "We have enclosed a signed and notarized authorization
> that allows us to receive this inforrmation on behalf of our client. "
>
> >>> Need to turn bold ON here to bold the following sentence
>
> rngWord.InsertAfter "If you would prefer payment in advance, kindly advise
> and we shall remit same immediately. "
>
> >>> Need to turn bold OFF here
>
> rngWord.InsertAfter "Thank you for your anticipated cooperation."
>
>
> I've tried a few things that don't seem to work. What code do I need to
bold
> that middle sentence?
>
> Thanks,
>
> Keith
>
>