Specifying location of new inlineshape in Word VBA?

Posted by Branan on Stack Overflow See other posts from Stack Overflow or by Branan
Published on 2008-09-19T17:40:44Z Indexed on 2010/04/25 4:53 UTC
Read the original article Hit count: 354

I'm working on a document "wizard" for the company that I work for. It's a .dot file with a header consisting of some text and some form fields, and a lot of VBA code. The body of the document is pulled in as an OLE object from a separate .doc file.

Currently, this is being done as a Shape, rather than an InlineShape. I did this because I can absolutely position the Shape, whereas the InlineShape always appears at the beginning of the document.

The problem with this is that a Shape doesn't move when the size of the header changes. If someone needs to add or remove a line from the header due to a special case, they also need to move the object that defines the body. This is a pain, and I'd like to avoid it if possible.

Long story short, how do I position an InlineShape using VBA in Word?

Oh, and this is for a 10-year-old system setup, so Office '97.

© Stack Overflow or respective owner

Related posts about vba

Related posts about microsoft-word