Can a word document be inserted into a access report?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ncsthbell
    New Member
    • May 2007
    • 167

    Can a word document be inserted into a access report?

    Within the access code, can I create a new report, or edit existing and cut and paste (or whatever method possible) and insert a word document in to the report detail?
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Up to a point, yes it is possible to copy and paste from Word. It is done by using bookmarks to enclose the segment you wish to copy, then using Word automation in VBA to open the document, select the bookmark and copy the text etc.

    Post 1 of the thread linked here shows some of these elements in action, although in the other direction (from Access to Word).

    Note that you would be pasting unformatted text if you copied from Word into Access. Although there are ActiveX controls for rich text available they are not in widespread use for a number of reasons, so in normal Access reports you would lose any formatting applied to the text in Word.

    -Stewart

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #3
      1. Open the Report in Design View.
      2. Select the Report's Detail Section.
      3. Click on Insert ==> Object.
      4. Select Create from File.
      5. Do 'not' check the Link or Display as Icon Options.
      6. Click on the Browse Button.
      7. Select the appropriate Word Document (*.doc).
      8. Click OK in the Browse Dialog Box.
      9. Click OK in the Insert Object Dialog Box.
      10. Your Word Document is now embedded in the Detail Section of your Report.

      Comment

      Working...