use visual basic 6 to export to word2007
I used code below to type a text with desired font into word from vb6. it works fine when I use it to type English texts, but when I use it to type persian texts it just inserts text into word without the font. I really can't find the problem.
Code:
Private wrdApp As Word.Application 'MS Word object
Private wrdDoc As Word.Document 'MS Word Document
Private wrdSelection As Word.Selection 'MS Word Selection
Private Sub Form_Load()
Set wrdApp = New Word.Application
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Add
wrdDoc.Select
Set wrdSelection = wrdApp.Selection
wrdSelection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphCenter
wrdSelection.Font.Name = "Arial"
wrdSelection.Font.Size = 14
wrdSelection.Font.Bold = True
wrdSelection.TypeText "Something in English"
wrdApp.Selection.TypeParagraph
wrdSelection.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphRight
wrdSelection.Font.Name = "Tahoma"
wrdSelection.Font.Size = 24
wrdSelection.Font.Bold = False
wrdSelection.TypeText "Something in persian"
End Sub