I am trying to find a way by code to insert/embed a Word Document into a bound OLE field on a form rather than using the menu and the Insert Object Open Dialog Box.
Can anyone help?
Dim strOle As String
strOle = "c:\my documents\Test.doc" 'this can ref a control
Me!YourBoundOLEControlName.SetFocus
SendKeys "%f,%e" & strOle & "{ENTER}"
RunCommand acCmdInsertObject
There probably is a cleaner way to do this, but for the life of me, I can't find it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.