Open OLE Word hidden for VBA edit (1 Viewer)

Kronix

Registered User.
Local time
Today, 05:23
Joined
Nov 2, 2017
Messages
102
When I use this code to open an OLE embedded Word document

Me![Doc].Verb = acOLEVerbShow
Me![Doc].Action = acOLEActivate

the MS Word program pops up with the document, but I want it to be hidden because I only want to modify its contents with VBA using Me![Doc].Application.ActiveDocument after it's opened. I tried changing acOLEVerbShow to acOLEVerbHide but it gave me a runtime error 13146.
 

isladogs

MVP / VIP
Local time
Today, 04:23
Joined
Jan 14, 2017
Messages
18,272
This post seems to have been overlooked
I've never used code like this to open Word and you may be able to do this in other ways

However, are you sure its Access error 13146?
I have what I believe is a full list of Access error codes from MS & that isn't on the list.
Perhaps its a Word VBA error?

What is the error description associated with the error?
Also have you tried using error trapping to bypass the error to determine whether it will then complete as you want it to do.

EDIT:
For a complete list of error codes, see either of these:
https://www.access-programmers.co.uk/forums/showthread.php?t=294824
http://www.fmsinc.com/MicrosoftAccess/Errors/ErrorNumber_Description2010.html
 
Last edited:

chacham

Member
Local time
, 23:23
Joined
Oct 26, 2020
Messages
45
However, are you sure its Access error 13146?
I have what I believe is a full list of Access error codes from MS & that isn't on the list.
Perhaps its a Word VBA error?

What is the error description associated with the error?

I received error 13146 (see other thread) consistently. The message is: Sorry, an unexpected error occurred Please exit and restart <database title>.

In my case, it was from trying to embed a non-embeddable type. I'm guessing 13146 is a general OLE error.
 

Users who are viewing this thread

Top Bottom