1. can we directly by pressing the button add a word document not giving a choice dialog box
Yes you can. As an example, to directly Embed the Word Document Test.docx into a Bound OLE Object Field on the Current Form, where Test.docx is in the same Folder as your DB:
- With Me![txtOLE]
-
.Class = "Word.Document"
-
.OLETypeAllowed = acOLEEmbedded
-
.SourceDoc = CurrentProject.Path & "\Test.docx"
-
.Action = acOLECreateEmbed
-
End With
P.S. - If I'm not mistaken, Access does not control the Printing of Embedded Objects, the Server Application that created them does. If you are interested in simply Printing the Embedded Objects, then there is a work-a-round. You can store them as Binary Objects in an OLE Object Field, extract them on demand to a Temporary Folder, then Print them using the ShellExecute() API Function. Obviously, this is more complex approach that would require changing any existing Code.