HI, I am a rookie VBA coder, I use it to automate work for myself
I have this piece of code that is part of a larger routine, all works but I would like to make some text bold and underlined and some normal.
My end result is for it to look like the sample below, where the word Issue would be bold and underlined and the text under it would not be bold or underlined. I will get the value of the text below the word Issue from a range on my sheet
Issue:
get cosignor
can someone help me with this? I tried a couple of things but really I don't know how to do it.
I have this piece of code that is part of a larger routine, all works but I would like to make some text bold and underlined and some normal.
VBA Code:
With wdDoc.Content
'--- paste the range image first, because it overwrites
' everything in the document
.PasteAndFormat Type:=wdChartPicture
.InlineShapes(1).Height = 750
'--- now add our greeting at the start of the email
' .InsertBefore "See current year production data and current pipeline. " & vbCr & vbCr
.InsertBefore "Please Review " & vbCr & vbCr ' & vbCr & .Font.Bold & "<u><b>Issue: </u></b>"
'--- finally add our sign off after the image
.InsertAfter vbCr & vbCr & _
"Thank you" & vbCr & vbCr
End With
My end result is for it to look like the sample below, where the word Issue would be bold and underlined and the text under it would not be bold or underlined. I will get the value of the text below the word Issue from a range on my sheet
Issue:
get cosignor
can someone help me with this? I tried a couple of things but really I don't know how to do it.