Editing the format of a Word document
Hi
I have a procedure in vb.net that create a word document. Here is my code
Code:
Dim wrd As Word.Application
Dim doc As Word.Document
Dim rng As Word.Range
Try
wrd = New Word.Application
wrd.Visible = False
Catch ex As Exception
MsgBox("An error occured while printing, please try again")
End Try
doc = wrd.Documents.Add()
rng = doc.Range()
...
For Each StringDr In StringDv
Select Case StringDr("No")
Case 502 '1.2
rng.Text = rng.Text + StringDr("Message")
Case 503 '1.2.1
rng.Text = rng.Text + StringDr("Message")
Case 504 '1.2.2
rng.Text = rng.Text + StringDr("Message")
End Select
Next
doc.SaveAs("c:\OperSeq.doc")
wrd.Quit()
Now What I would like to have is when I enter in the case 503, I would like that it put this "StringDr("Message")" text in bold in my word document.
Does somebody can help me with this?
Thanks in advance