Hi
I have a procedure in vb.net that create a word document. Here is my code
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
I have a procedure in vb.net that create a word document. Here is my code
VB.NET:
[LEFT]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[/LEFT]
[LEFT]doc = wrd.Documents.Add()
rng = doc.Range()[/LEFT]
[LEFT]...[/LEFT]
[LEFT]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[/LEFT]
[LEFT]doc.SaveAs("c:\OperSeq.doc")
wrd.Quit()[/LEFT]
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