Opening and printing a word doc.

How do you do it I.ve tried using a rich text box to display the Text and images, but first i had to convert the doc to rtf. which is going to take forever if i have to convert all my doc's.

Help!!

Much appreciated.


Answer this question

Opening and printing a word doc.

  • Hrishikesh

    Download and install the Office 2003 PIAs...


  • Xancholy

    Hi check this

    Sending Documents to the Printer

    The PrintThisFile method in the cShellExec class lets you send a specific file to the printer. The code fragment for PrintThisFile is:

    Public Sub PrintThisFile(FormName As Long, FileName As String)
      On Error Resume Next
      Dim X As Long
      X = ShellExecute(FormName, "Print", FileName, vbNullString, 0&, SW_SHOWMAXIMIZED)
    End Sub
    

    As with both the ExploreFolder and OpenThisDoc methods, the PrintThisFile method requires that you pass the file’s name and the parent window’s handle to the method. Next, the operation field of the ShellExecute function is set to “Print”, which sends the document to the printer.

    for the entire article goto http://msdn.microsoft.com/archive/default.asp url=/archive/en-us/dnarvb4/html/msdn_shelexec.asp



  • Chuff

    Tell me how to...

    If you can automate the editing

    I've been trying to get to the Word namespace but can't seem to.

    Ray



  • stangnut

    Hi man,

    The article I mentioned contains refrence for both Opening and Priniting.. I would be glad if u mark the post as answered



  • Lohic Beneyzet-Jouy

    Awesome quick reply... But first i need to open the file to edit it and then print it from the form, hte edited version.

  • Vaish

    OLE Document embedding is not supported by the .NET framework. But it is still supported by Internet Explorer. Display the document in a WebBrowser control. All you really get with that is the Word GUI inside a window in your app. If you can automate the editing, use the Microsoft.Office.Interop.Word namespace; that lets you print the document too...


  • Opening and printing a word doc.