Results 1 to 4 of 4

Programmatically Saving a PRN FIle

This is a discussion on Programmatically Saving a PRN FIle within the Excel Questions forums, part of the Question Forums category; I am programmatically importing a fixed-width text file using OpenText(). I then manipulate it in terms of formatting and column ...

  1. #1
    MJG
    MJG is offline
    New Member
    Join Date
    May 2004
    Location
    Rancho Cordova
    Posts
    24

    Default Programmatically Saving a PRN FIle

    I am programmatically importing a fixed-width text file using OpenText().
    I then manipulate it in terms of formatting and column widths.

    I now want to programmatically save the file as a PRN. However, when I use the SaveAs method, I am only offered xlTextMSDOS and xlTextWindows, which both produce a Tab-delimited text file.

    How can I programmatically save the worksheet as a fixed-width PRN file?

    TIA

  2. #2
    MrExcel MVP
    Moderator
    Andrew Poulsom's Avatar
    Join Date
    Jul 2002
    Posts
    64,601

    Default Re: Programmatically Saving a PRN FIle

    Use the format xlTextPrinter.

  3. #3
    MJG
    MJG is offline
    New Member
    Join Date
    May 2004
    Location
    Rancho Cordova
    Posts
    24

    Default Re: Programmatically Saving a PRN FIle

    Thank you so much for the tip. I just looked in the help file and this option is not in the list of formats. Where did you find documentation on this?

  4. #4
    MrExcel MVP
    Moderator
    Andrew Poulsom's Avatar
    Join Date
    Jul 2002
    Posts
    64,601

    Default Re: Programmatically Saving a PRN FIle

    In VBE Help look at the SaveAs method and click the FileFormat property link.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com