Results 1 to 4 of 4

Thread: Saving Files In Rich Text Box With Common Dialog Control

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    Post

    How do i do it??

    Thanks

    Steve

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Try something like this:

    Code:
    Private Sub Command1_Click()
        On Error Resume Next
        
        With CommonDialog1
            .Filter = "Rich Text Format (*.rtf)|*.rtf"
            .ShowSave
            If Err.Number = cdlCancel Then Exit Sub
            RichTextBox1.SaveFile .FileName, rtfRTF
        End With
    End Sub
    ------------------

    Serge

    Senior Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    Post

    That works good. Now is there a way to save it as html? When I tried it i got lots of numbers and letters in the browser.


    Steve

  4. #4
    Addicted Member
    Join Date
    May 1999
    Location
    Californ-I- A
    Posts
    207

    Post

    You can't just save it as RTF, you have to actually anylize the RTF code and convert it to HTML. Do a search for "RTF" at www.planetsourcecode.com and you'll find some code to do just that.

    ------------------
    Micah Carrick
    http://micah.carrick.com
    [email protected]
    ICQ: 53480225


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width