Overflow msg received when converting to shape

K

Kim

How many characters are allowable for a "name" when you
are converting an inline shape to a shape? example:
ActiveDocument.InlineShapes(1).ConvertToShape.Name =
ShapeName

I am getting overflow errors with certain picture names I
am using and I am trying to find some documentation as to
what an acceptable length would be.
 
H

Helmut Weber

Hi Kim,
I guess you have discovered a real bug!
With ActiveDocument.InlineShapes(1).ConvertToShape
here and now Word invariably crashes: "Overflow"!
But has certainly nothing to do with the length of the name.
If it is important to you, try to insert an additional inlineshape,
convert to shapes, whatever inlineshapes you like, and remove
the inserted one. But that's more hoping then knowing.
 
K

Kim

Thanks for the info, I am able to get it to work with
shorter names but longer names invariably provide me with
an overflow message. Its very odd
 
J

Jay Freedman

Hi Kim,

In Word 2003, I can use your code to assign a 32-character name to the shape
without any problem. If I try 33 characters, I get a runtime error "The
specified value is out of range". This stops the macro but doesn't crash
Word.
 

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