Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Park City, Utah
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    ASCII Text Conversion (2000)

    I need to save a word document in TXT format with hex 0D (ASCII 13) as the "new line" indicator. Which word code does this and which TXT file format should I use to SAVE AS?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: ASCII Text Conversion (2000)

    I don't have Word 2000 any more. Which formats have you tried? Does it force you to choose an encoding? If so, try Western European (Windows) and also Unicode and see if any of them work.

    If the question is, how can you confirm the normally-not-displayed CR code is there, you could use a hex editor. I believe if you search for hex editor on the software board, one or more free ones has been suggested. You also can use the built-in DEBUG command, but if you've never used it before, it's probably not worth learning its arcane syntax.

    (Actually, it should be possible to write a little Word macro to create a hex editor-style "report" on another file inside a Word document. Hmmm... in my spare time... <img src=/S/smile.gif border=0 alt=smile width=15 height=15> )

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ASCII Text Conversion (2000)

    MS-DOS Text with Line Breaks will probably give you what you are looking for.
    Legare Coleman

  4. #4
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Park City, Utah
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: ASCII Text Conversion (2000)

    Yikes! After doing a little research, in the knowledge base it basically says that Word converts any line feed, section break, paragraph, enter, etc. to a paragraph when converting to any of the TXT formats. This is a REAL problem for me as it inserts both the CR/LF commands. I have to ONLY have the hex 0D or ASCII 13 in there. I used a hex editor to remove the 0A codes and the file uploaded to the system we are interfacing to just fine.

    These are documents for which we need all the word processing tools to create them, but they are being sent to another system. Anyone with any ideas?

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: ASCII Text Conversion (2000)

    How big are the documents? If the entire text can fit into a string variable, you could first save them to disk as TXT, then read them into a string, use the Replace function to get rid of the 0A characters, then write the string back to a file. Actually a neater way to do it would be to Split on 0D0A but Join using just 0D. I think you can do that. (This is all off the top of my head... apologies if it turns out to be useless.)

Posting Permissions

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