Context menu for opening an OLE object displayed in a form

emorris1000

Registered User.
Local time
Yesterday, 16:49
Joined
Feb 22, 2011
Messages
125
Normally when you double click on an OLE object it brings up a localized version of the program that handles the OLE object. However, if you right click and scroll down there is an option for "CS Chemdraw Object" which then goes to "Open".

This gives opens the file in the full version of the program. I don't know if this is specific to Chemdraw but I doubt it.


What I want is to put in a right click context menu that gives this option. I already know how to put in context menus with macros, I just don't know how to do what I am thinking of here.


Edit:

Ok, I got the first part of it to work, but there seems to be a bug. Steps are:

SelectObject - (Form the drawing is in)
GetFocus - (OLE object)
SendKeys - (Ctrl + Enter, actual syntax = ^{ENTER} )

Now, this actually works, but I get a beep from the computer Midi controller, which tells me that I did something wrong, somewhere.

Anythoughts?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom