Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Moving picture changes anchor?

0 views
Skip to first unread message

Cindy M -WordMVP-

unread,
Feb 3, 2006, 12:19:49 PM2/3/06
to
Hi =?Utf-8?B?Um9sZiBXZXN0bHk=?=,

I take it you're doing the moving in the UI, not with code?

Go into the Format dialog box for the picture, Layout/Advanced. The more
detailed position information is in there. Is "Move with Text" activated after
your code has inserted the picture? And after you've moved it?

As a general rule, as soon as you move something using the mouse, it will tend
to position the object relative to the page, and not to the anchoring text,
unless you do it over this dialog box.

> I do the following in my Word 2003 VBA code:
>
> dim anch as range
> activedocument.bookmarks("Start").Select
> set anch = selection.range
> addpicture(pic, false, true, 0, 0, 100, 100, anch)
>
> (the bookmark is inside a tablecell)
>
> When I check the left and top properties of the shape (the picture) they are
> both 0(as I would expect). RelativeHorizontalPosition and
> RelativeVerticalPosition are both wdRelative.....PositionColumn.
>
> But if I move the upper left corner of the picture to the lower right corner
> of the original picture position I thought I should have left = 100 and top =
> 100. But Left is 288 and top 99.
>
> Why? Is there any way I can have Left and Top remain relative to the anchor?
>

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

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

0 new messages