Results 1 to 8 of 8

Thread: Word saving a text file

  1. #1

    Thread Starter
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post

    I am using VB to save a RTF as a text file. The problem is that I loose the formating. We used to have a unix based word perfect program that could take a formated file and save it as a text file, inserting spaces and tabs were they were needed.
    Can Word preserve the layout when saving a text file?
    thank you for your time and have a good day

    ------------------
    I am so skeptacle, I can hardly believe it!

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    When you save the Text in the RichTextBox use its SaveFile Method to save the File in RTF Format, ie.
    Code:
    Private Sub Command1_Click()
        RichTextBox1.SaveFile "C:\Formatted.rtf", rtfRTF
    End Sub

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]


  3. #3

    Thread Starter
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post

    I didn't say this the right way.
    I cant have a RTF. I need a txt file.
    I am trying to take advantage of word's SaveAs command. there is a choice for text with formatting. The proble(bug) is that it doesn't do a good job of formatting.
    Battery Back-Up Exit and Egress Lights
    The EC shall test all battery back-up exit and egress light
    fixtures as follows:
    1. Connect all battery back-up lights to power and allow
    batteries to charge for at least 12 hours.
    gets saved by word as the following
    Battery Back-Up Exit and Egress Lights
    The EC shall test all battery back-up exit and egress light
    fixtures as follows:
    1. Connect all battery back-up lights to power and allow
    batteries to charge for at least 12 hours.
    it looses the imbedded indention. Is there a setting or something that I am missing. I assumed that when is said text file with formating it would keep the formatting.
    thank you arron for your reply

    ------------------
    I am so skeptacle, I can hardly believe it!


    [This message has been edited by badgers (edited 01-12-2000).]

  4. #4

    Thread Starter
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post


  5. #5

    Thread Starter
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post

    I'm sinking!
    is their a RTF to .txt conversion program on the net? I mean one that works better then the one in Word

  6. #6

    Thread Starter
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post

    I will not give up!
    there has to be a way to get a RTF into a text file that keeps the format!

  7. #7
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355

    Post

    unfortunately, it looks like everyone else has
    sorry, no idea m8
    except figure it out yourself
    hehe

    ------------------
    cintel rules
    www.cintelsoftware.co.uk

  8. #8

    Thread Starter
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post

    OK I give up

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