Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003

    Angry Unanswered: Include Word Document in Report?


    Does anyone know how to combine an existing Word Document with an Access Report <dynamically>?

    I have a report that I created in Access, and would like to include information that is already entered in a Word document, stored on the network.

    I have tried creating both bound & unbound object frames. The unbound works ok, but my problem is that i need to change the name of the report depending on which product is being viewed. I.E. when I create reports for more than one record, I need the report to display different documentation for each product when I scroll through the pages. I have tried doing this programmatically, but it still shows the original report that I used to created the link.

    The code that I've tried is as follows - (both bound/unbound):

    Me.boundPLI.OLETypeAllowed = acOLELinked
    Me.boundPLI.Class = "Word.Document"
    Me.boundPLI.SourceDoc = docPath
    Me.boundPLI.Action = acOLECreateLink

    The code then always errors at the .Action line... i think something to the effect of 'the Action can't be carried out right now'. When I comment out the .Action line, the report opens w/nothing in the Frame. This is also the case when trying this sort of code with an unbound OLE.

    Right now, I've managed to programmatically update a 'temp' word document and just link to that. This works ok for one product, but again, when viewing more than one, the OLE object is only showing the first word information.

    I've also tried using a form as a subreport. The form works fine as a form, updates the OLE fine when scrolling through the records. But, when I view it on the report, the OLE just shows up blank.

    Any ideas would be HUGELY appreciated!!!
    Thanks, Janel

  2. #2
    Join Date
    Jun 2002
    Vienna, VA
    My suggestion would be to use Word exclusively. Just output all your stuff to word, and pass the desired filename to include. It will be a lot of work, but your formatting will be consistent, and it will be much more useable to the end user.


  3. #3
    Join Date
    Jan 2003
    thanks Leah, but have already tried that. My problem is that my report has about 8 subreports on it, and coding to create a word document with that many subs is beyond my capabilities right now I think. It is something I would like to master later on however...

Posting Permissions

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