Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Sep 2004
    Location
    Nashville, Tennessee, USA
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Convert to txt (Word 2003 sp1)

    We recently upgraded to Word 2003 and now a stand alone VB program that processes Word documents stops with the following dialog when attempting to SaveAs a txt file.
    ---
    File Conversion - DocToConvert.txt
    Warning: Saving as a text file will cause all formatting, pictures, and objects in your file to be lost.
    Text encoding
    o windows(default) @ MS-DOS o Other encoding
    [OK] [Cancel]
    ---

    This dialog appears when running the following code:
    ActiveDocument.SaveAs "NewFile.txt", wdFormatDOSText
    Have also used, with same results:
    ActiveDocument.SaveAs "NewFile.txt", wdFormatTextLineBreaks

    I created the code from record a macro in Word and it runs without a problem on another PC. Both these PC's are version:
    Word 2003 (11.6359.6360) SP1
    Part of Microsoft Office Professional Edition 2003

    I've recorded the Tools/Options settings in PC A [that works] and run the resulting macro on PC B without change in results.
    Any pointers for further investigation greatly appreciated

    Bob

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Convert to txt (Word 2003 sp1)

    I don't have Word 2003 myself, but does it help if you insert

    Application.DisplayAlerts = False

    above the line that does the SaveAs, and

    Application.DisplayAlerts = True

    below it?

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Convert to txt (Word 2003 sp1)

    If you want to discard all possible alert messages from this action then you can put
    <code>Application.DisplayAlerts = wdAlertsNone</code>
    and
    <code>Application.DisplayAlerts = wdAlertsAll</code>
    before and after it.

    StuartR

  4. #4
    Lounger
    Join Date
    Sep 2004
    Location
    Nashville, Tennessee, USA
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Convert to txt (Word 2003 sp1)

    Hans & Stuart,

    Thank you for your prompt response. I will try that and let you know.

    Bob

Posting Permissions

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