I am trying to write a vba script in Excel 2007 and the objective is to open an existing word 2007 document and write a date into the Bookmark with the font bold and underlined.
I have managed to open the word document and write the date value into the Bookmark, but i can't seem to make the font bold or underlined.
The following is my code:
Set wordapp = New Word.Application
Set myDoc = wordapp.Documents.Open("C:\Template.doc")
' Write into word Bookmark
If myDoc.Bookmarks.Exists("CurrentMonth") Then
'how to make font Bold and underlined???
myDoc.Bookmarks("CurrentMonth").Range.Text = Format(dEndMth, "d MMMM yyyy")