Pasting Word Document Content on Server Side

  •  10-04-2010, 3:44 AM

    Pasting Word Document Content on Server Side

    Hello,
     
    Since the LoadWord is not implemented yet, i thought of the following:
       - read the content of a word document using MsWord object on server side
       - copy the content of the file to clipboard
       - paste it to the Editor using the option PasteWord which cleans complex word formats
     
    I was able to write the code for the first two parts as follows

    'Read the DOC file
    Try

    Dim filePath As String = Server.MapPath("Forms\opr.doc")
    Dim wordApplication As Word.Application = New Word.Application
    Dim wordDoc As Word.Document = wordApplication.Documents.Open(filePath) wordApplication.ActiveDocument.Content.Copy()

    'Paste into Cute Editor

    wordDoc.Close()
    Catch ex As Exception
    End Try

     

    However how to write the part that pastes to the editor!?!? Any ideas out there?
    Thanks,

     
    Filed under: , ,
View Complete Thread