Results 1 to 2 of 2

Thread: Word Doc (A2K)

  1. #1
    New Lounger
    Join Date
    Jan 2003
    Albuquerque, New Mexico, USA
    Thanked 0 Times in 0 Posts

    Word Doc (A2K)

    I need to link a work doc (viewable) in a form and then print or fax it with the report.
    Example I have a purchase order that needs to have quality requirements attached. My thinking is to have a two fields, one called

  2. #2
    5 Star Lounger
    Join Date
    Jul 2002
    Toronto, Ontario, Canada
    Thanked 0 Times in 0 Posts

    Re: Word Doc (A2K)

    The two fields in the table is a good idea, although I typically see and use a single field for the full path and doc name.

    Have the Word document show up on the form, you will need to create a Bound Object Frame on the form.

    Then this code will populate the Object Frame with the file that is in the field called FullPath:

    With OLEBound1
    <font color=448800>'Set the Source of the OLE Object</font color=448800>
    .SourceDoc = FullPath
    <font color=448800>'Create the Link</font color=448800>
    .Action = acOLECreateLink
    End With

    I would recommend AGAINST putting this code in the OnCurrent Event of the form. It will make your form become REALLY slow. I would recommend putting the code behind a command button to allow the used decide when they want to see it.

    As for printing it, you can put a bound object on the report, but it the document wouldn't be full size, it would be the size of the control on the report, so you are probably better off printing it directly from Word.
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

Posting Permissions

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