How to append Menu with custom object inserted into MS Word?

A

Ahmad Jalil Qarshi

hi!

i have made my own custom object for MS Word. i have successfully inserted
it into the Word document. now i want to append my own menu with this
object. I made my own menu for my object and showed it on the right mouse
button click event. it works fine when you first time insert the object
using a toolbar button. but when you save the document or resize the object
the it shows MS Words own context menu for right mouse button click event.
now i want to append my menu with this MS Word's context menu. i dont know
how to do that. plz help me. i m using VC7 and COM. but i think that a VBA
code may also help me.

The place where i want to append my menu is

Cut
Copy
Paste
MyObj Object Convert
...... MenuClick1
..... MenuClick2
..... MenuClick3
....

i.e the menu will apend under "Convert" menu item.

Thanks in advance.

Ahmad Jalil Qarshi
 
C

Cindy M -WordMVP-

Hi Ahmad,

I think you'll find information on this on the word.mvps.org website.

A context menu is a commandbar, just as a menu or a toolbar is, but of the
type msoBarTypePopup. There are a LOT of them, so you may find you need to
modify more than just one. (Look at the list in Tools/Customize/Toolbars,
choosing the entry Shortcut menus.) The entries in this list correspond to
the commandbar caption, so you can address the one(s) you want to modify via
Commandbars("Caption"). Don't forget to set the Customizationcontext!
i have made my own custom object for MS Word. i have successfully inserted
it into the Word document. now i want to append my own menu with this
object. I made my own menu for my object and showed it on the right mouse
button click event. it works fine when you first time insert the object
using a toolbar button. but when you save the document or resize the object
the it shows MS Words own context menu for right mouse button click event.
now i want to append my menu with this MS Word's context menu. i dont know
how to do that. plz help me. i m using VC7 and COM. but i think that a VBA
code may also help me.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top