converting shapes

J

JMGonzalez

Hi
I'm having a problem when automating Word in office 2003 with c++ code.
I've pasted a picture from the clipboard and it is included in Inlineshapes.
The problem occurs when i try to convert this inlineshape into a shape with
the following code:

LPDISPATCH inlineShapeDisp = objInlineShapes->Item(1);
objInlineShape->AttachDispatch(inlineShapeDisp);
objInlineShape->ConvertToShape();

In the last line, an error window with no text appears. i would be grateful
if anyone could help me. Thanks in advance
 
L

Linwood Hudson

JMGonzalez said:
Hi
I'm having a problem when automating Word in office 2003 with c++ code.
I've pasted a picture from the clipboard and it is included in Inlineshapes.
The problem occurs when i try to convert this inlineshape into a shape with
the following code:

LPDISPATCH inlineShapeDisp = objInlineShapes->Item(1);
objInlineShape->AttachDispatch(inlineShapeDisp);
objInlineShape->ConvertToShape();

In the last line, an error window with no text appears. i would be grateful
if anyone could help me. Thanks in advance

I'm having this exact same problem. I've added a picture to Word's
InlineShapes collection using AddPicture, which returns an InlineShape
object. I'd like to access the locational information of the image, but
the members I need (GetTop() and GetLeft()) are only defined for Shape
objects. Attempting to convert the InlineShape to a Shape using
ConvertToShape results in an exception being thrown with an empty error
window.

Any help would be appreciated, either with the ConvertToShape method or
with some other approach to getting the locational info of my InlineShape.

Linwood
 

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