Crash when inserting OLE control in Word table

J

JY

Hi,

Our application is a plug-in into MS Word. A crash occurs when we try to
insert our custom OLE control into a table. The code snippet is:

//In header file
Word::_ApplicationPtr m_pWord;

//In cpp file
pWord->Selection->InlineShapes->AddOLEControl(&vtClass);
//vtClass is an initialized CComVariant;

Appreciate if someone can point out what is wrong.

TIA,
JY
 

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