Re: Export to RTF From VSPrint

ActiveX

ActiveX controls

Export to RTF From VSPrint

  • rated by 0 users
  • This post has 1 Reply |
  • 1 Follower
  • Hi everyone!

    I am using VSPrint in a Web Application and I want to export preview page to *.rtf file. How can I do it?

  • Hello,
     
    You may use the TextRTF Property or ExportFile Property to get the desired functionality:
     
    The code below shows how you can use the same code to generate regular output, HTML, or RTF files:

    Private Sub CreateDocument(sFile As String)

      With vp

        ' set up to export RTF, HTML, or nothing

        .ExportFile = ""

        If Instr(sFile, ".rtf") Then

          .ExportFile = sFile

          .ExportFormat = vpxRTF

        ElseIf Instr(sFile, ".htm") Then

          .ExportFile = sFile

          .ExportFormat = vpxDHTML

        End If

        ' create document

        .StartDoc

        CreateDocumentBody

        .EndDoc

        ' clear ExportFile to avoid overwriting it

        .ExportFile = ""

    End Sub

    Have a nice day.

    Regards,

    James Smith

     
     
    <g7su5ue5> wrote in message news:212260@10.0.1.98...

    Hi everyone!

    I am using VSPrint in a Web Application and I want to export preview page to *.rtf file. How can I do it?



    http://helpcentral.componentone.com/cs/forums/p/77551/212260.aspx#212260

Page 1 of 1 (2 items)