sanam 0 Newbie Poster

hello I send to items to Microsof t word with this code:

Dim wdApp As Word.Application
   Dim oDoc As Word.Document
   Dim oRange As Word.Range

   'Create new hidden instance of Word.
   Set wdApp = New Word.Application
 
   With wdApp
       ' Show this instance of Word.
       .Visible = True
       .ScreenUpdating = False
       ' Code to automate Word here.
       'Add a new document
       Set oDoc = .Documents.Add
   End With
   Set oRange = oDoc.Range
   With oRange
       'move the cursor to start
       .Collapse wdCollapseStart
       'Make center current paragraph alignment
      .ParagraphFormat.Alignment = wdAlignParagraphCenter
       'To insert a paragraph or new line

       'to insert a text
       .InsertAfter "ã˜ÇäíÒã ÑÏÇÎÊ ÒÔ˜ ÎÇäæÇÏå"
       'Move the insertion point to end;
      .Collapse Direction:=wdCollapseEnd
       .InsertAfter vbCrLf

     
       .InsertAfter "äÇã æ äÇã ÎÇäæÇÏí" & ":" & Label7.Caption
       .InsertAfter vbTab
       .InsertAfter "ÓÇá" & ":" & MSFlexGrid1.TextMatrix(1, 1)

after this code I want draw a line in this document .
How can I do this?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.