Results 1 to 13 of 13
  1. #1
    Join Date
    Aug 2007
    Posts
    6

    Unanswered: Clean printing of embedded Word docs without form artifacts

    I'm using Access 2003 (Office 2003 Pro).

    The purpose of my application is to manage a collection of a few hundred 1-page Word documents. Each document is stored as an embeddede OLE object and displayed in a subform. They are small in size - 15-20K.

    The typical workflow is to create an ad-hoc collection of documents through queries and then print multiple collated copies of the collection.

    How do I get Access to print only the Word doc/OLE obect and not the entire form? I get various artifacts and extraneous output from Access in the printout and I only want the clean output of the Word doc itself.

  2. #2
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Create a button that opens the doc, hits print, closes the doc and your application?
    Ryan
    My Blog

  3. #3
    Join Date
    Aug 2007
    Posts
    6
    That would probably work but I'd like to do it out of Access if I can. I'm working on a report that has nothing in it but the OLE control but I can't figure out how to size it so it doesn't run over into extra pages.

    Right now I'm getting 6 output pages per document, all of them blank except one. I'm doing trial and error with margins and control sizes but there has to be a systematic way to get this right. Is there a secret to how to size things or at least a rule of thumb?

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I'd call the button "Print Preview", and all it does is open the darn file
    George
    Home | Blog

  5. #5
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    OK, I am confused... You have a form that you can import a word doc. You are now throwing that word doc into an access report, and even though your word doc is a page, the report is 6 pages? Are you putting any fancy stuff in the report [title, border, etc] or just outputting your object?
    Ryan
    My Blog

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Actually, Ryan is right... I'd be intrigued to see a sample of this database, just to see what's what!
    George
    Home | Blog

  7. #7
    Join Date
    Aug 2007
    Posts
    6
    OK - thanks for the suggestions, I figured it out with some more tinkering. Here's what I had to do:

    1) Make sure both the report form and the OLE control on the form are exactly the same size. I chose 7.5" wide by 10" tall.

    2) Get rid of all the header and footer stuff.

    3) Set appropriate print margins to add up to the output paper size (in this case 1/2" all around)

    4) Make the control border transparent.

    5) Set the source of the report to my document query.

    6) Connected the following code to the print button (to print 1 document):

    DoCmd.SelectObject acReport, "PrintCurrentDoc", True
    DoCmd.PrintOut

  8. #8
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    me too, if he's outputting the doc as is on the report, why not just do my original suggestion?
    Ryan
    My Blog

  9. #9
    Join Date
    Aug 2007
    Posts
    6
    Quote Originally Posted by rguy84
    OK, I am confused... You have a form that you can import a word doc. You are now throwing that word doc into an access report, and even though your word doc is a page, the report is 6 pages? Are you putting any fancy stuff in the report [title, border, etc] or just outputting your object?
    Yeah - the print preview of it was 6 pages, because I had the report form itself set to 8.5 x 11 which was blowing up on every side because of the size I had the control set to and its position within the report form and the print margins...

  10. #10
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    What about the second half of my question?
    Ryan
    My Blog

  11. #11
    Join Date
    Aug 2007
    Posts
    6
    Quote Originally Posted by rguy84
    me too, if he's outputting the doc as is on the report, why not just do my original suggestion?
    Because with a report I can aggregate the ad-hoc doc collection into a single multi-page report with a query and print it all out in one call (that's my plan - not implemented yet of course). Opening each document seperately makes for a lot of stuff popping up and dissappearing.

  12. #12
    Join Date
    Aug 2007
    Posts
    6
    Quote Originally Posted by rguy84
    What about the second half of my question?
    Sorry - no I'm just printing the object itself - no headers or footers.

  13. #13
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Oh! I didn't realise you combined multiple ones together. Then using a report to do it makes sense.
    Ryan
    My Blog

Posting Permissions

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