Changing the anchor point of a shape in code 
Author Message
 Changing the anchor point of a shape in code

The code I have been developing looks for specific formfields and then
replaces the field and any surrounding text with a unique identifier before
printing the document. The formfield is used as a marker where information
will be added later by another process. The preceding and following text are
considered part of the marker to allow information to be placed within a
paragraph.

The problem I have run into is if the surrounding text contains "shapes"
when I replace the text the "shapes" are lost. However, the "shapes"
themselves do not take up text space. What I need to do is to re-anchor them
to somewhere else while I do the replacement, then anchor them back to the
text I have been working on. Unfortunately, the anchor structure is
read-only and I cannot get Word to tell me as it won't record a macro
involving drag and drop.

THX in advance

Martin JD Green



Sun, 18 Jan 2004 01:46:34 GMT  
 Changing the anchor point of a shape in code
Hi Martin,

Quote:
> The problem I have run into is if the surrounding text contains "shapes"
> when I replace the text the "shapes" are lost. However, the "shapes"
> themselves do not take up text space. What I need to do is to re-anchor them
> to somewhere else while I do the replacement, then anchor them back to the
> text I

You can only "re-anchor" a shape by using copy/paste.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://www.mvps.org/word
http://go.compuserve.com/MSOfficeForum

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



Sun, 18 Jan 2004 17:23:40 GMT  
 Changing the anchor point of a shape in code
Does this mean that Word has its own way of doing it and we can't get at
that code, as I can drag an anchor point of a shape wherever I want. How
would I do a copy and paste from within code anyway?

Martin JD Green


Quote:
> Hi Martin,

> > The problem I have run into is if the surrounding text contains "shapes"
> > when I replace the text the "shapes" are lost. However, the "shapes"
> > themselves do not take up text space. What I need to do is to re-anchor
them
> > to somewhere else while I do the replacement, then anchor them back to
the
> > text I

> You can only "re-anchor" a shape by using copy/paste.

> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister
> http://www.mvps.org/word
> http://go.compuserve.com/MSOfficeForum

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



Tue, 20 Jan 2004 06:39:53 GMT  
 Changing the anchor point of a shape in code
Hi Martin

| Does this mean that Word has its own way of doing it and we can't get at
| that code

Yes. VBA does not provide a way to reset the position of an anchor. I hope

| How
| would I do a copy and paste from within code anyway?

See:
http://www.mvps.org/word/FAQs/MacrosVBA/MoveAnchor.htm

Regards

Dave



Tue, 20 Jan 2004 18:12:03 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Convert Inline to Shape and Anchor Shape

2. To distinguish between floating shapes anchored at same paragraph by bookmarks

3. Anchor for shapes

4. Locating Anchor of a Shape

5. Changing shapes in VBA Code

6. Shape color change problem (with code sample)

7. HELP shapes and power point VBA

8. Master shapes: control handles and glue points

9. Connection Points on 1D-Shapes

10. Shapes shapes shapes

11. Changing the location of an OLE object to point to somewhere else

12. data-point value -> change format

 

 
Powered by phpBB® Forum Software