Results 1 to 5 of 5
  1. #1
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Printing to a new document (2000 sp-3/ 98SE)

    I'm wanting to "borrow" some of the features of Application.PrintOut, but direct the output to a new Word document, rather than a printer driver. For instance, the Item:= wdPrintKeyAssignments. I can direct this to PDF, using an appropriate driver, but I'd really like something in Word (or RTF) and ideally I'd like it to appear opened as a new document, or appended to an existing open .DOC. Print to file is of no use, since it's all printer codes, and if I use a generic text-only driver, I lose all the Word formatting e.g. for printing styles and autotexts. Any ideas?

  2. #2
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing to a new document (2000 sp-3/ 98SE)

    Hi, Alan! <img src=/S/blush.gif border=0 alt=blush width=15 height=15> I don't have the first clue of how to accomplish this but... MS Access has a Print to rtf feature, and you can reference Access Object Model in the VBE -- It seems to me like there should be some way to combine that information to achieve what you're looking for. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Karen

  3. #3
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing to a new document (2000 sp-3/ 98SE)

    Thanks Karen. I have even less of a clue than you don't have. I tried this in Access and note that it's an Export function, rather than a Print one - I don't know if this is significant. I think my biggest hurdle is that all those neat options in Word seem to be very tightly bundled within the PrintOut routine inside the MSO9.DLL. I'll have to keep digging I think.

    Alan

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

    Re: Printing to a new document (2000 sp-3/ 98SE)

    I suspect that you will have to write your own routines (or hunt for them on the web) to list the items you want to a new document, similar to the ListCommands command that is available when you select Word Commands in the macro dialog.

  5. #5
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing to a new document (2000 sp-3/ 98SE)

    I feared as much, Hans, but my hunt has been fruitless so far. But you did provide what might be a satisfactory alternative to the 25 pages of ListAllCommands. I just noted that if this is set to False:

    Application.ListCommands ListAllCommands:=False

    then only the customized assignments appear, which is something like what is required. I'll play with that a bit I think.

    cheers
    Alan

Posting Permissions

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