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?
Can a word document be inserted into a access report?
Collapse
X
-
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 -
- Open the Report in Design View.
- Select the Report's Detail Section.
- Click on Insert ==> Object.
- Select Create from File.
- Do 'not' check the Link or Display as Icon Options.
- Click on the Browse Button.
- Select the appropriate Word Document (*.doc).
- Click OK in the Browse Dialog Box.
- Click OK in the Insert Object Dialog Box.
- Your Word Document is now embedded in the Detail Section of your Report.
Comment
Comment