mike phillips
Member
- Joined
- Aug 21, 2015
- Messages
- 7
- Programming Experience
- 5-10
Fresh from the help on the IDE forum, and having extensively Googled, I am now stuck on trying to format text written to a Word bookmark. I have successfully done this in Excel and tried replicating the code with no success. The code runs ok with no errors but does not produce the required text format.
Grateful for a nudge.
Grateful for a nudge.
VB.NET:
Dim oWord As Word.Application
oWord = CreateObject("Word.Application")
oWord.Visible = True
oDoc = oWord.Documents.Open("C:\WelfareForm.doc")
Dim oDoc As Word.Document
Dim wdrng As Word.Range
wdrng = oDoc.Bookmarks.Item('BOOKMARK').Range.Style
With wdrng
.Font.Color = 255
.Font.Bold = True
.Font.Size = 18
.Text = "foo"
End With