All
I have a vb app that opens a word doc and writes data to it, however, I am unable to change the size of the font nor make it bold. I find this odd as other functions such as italics and type of font work correctly. A snippet of my code is as follows:
<code>
dim WA as Word.Application
Set WA = GetObject("", "Word.Application")
If WA = "Nothing" Then ' True if not running
Set WA = CreateObject("Word.Application")
End If
WA.Visible = False
Set Doc = WA.Documents.Open(OpenPath)
Doc.Content.Select
With Doc.Application.Selection
.Font.Name = "Arial"
.Font.Size = 8
.Font.Italic = True
.Font.Bold = True
End With
WA.Doc.Content.Text = "This is some text"
</code>
Any help would be great.
cheers
K.
I have a vb app that opens a word doc and writes data to it, however, I am unable to change the size of the font nor make it bold. I find this odd as other functions such as italics and type of font work correctly. A snippet of my code is as follows:
<code>
dim WA as Word.Application
Set WA = GetObject("", "Word.Application")
If WA = "Nothing" Then ' True if not running
Set WA = CreateObject("Word.Application")
End If
WA.Visible = False
Set Doc = WA.Documents.Open(OpenPath)
Doc.Content.Select
With Doc.Application.Selection
.Font.Name = "Arial"
.Font.Size = 8
.Font.Italic = True
.Font.Bold = True
End With
WA.Doc.Content.Text = "This is some text"
</code>
Any help would be great.
cheers
K.