Solved

Anchor Position of pictures

Posted on 2003-10-23
2
525 Views
Last Modified: 2011-10-03
Hello,

Is there a way to get the position of the anchor a picture inserted in a word document using vba?

regards
0
Comment
Question by:vblycos
2 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 50 total points
ID: 9612388
the problem is this property is exposed through the shape object not an inlineshape

so if your pictures are inlineshapes and you don't mind converting them to shapeobjects you could do something like

Dim iShape As InlineShape
Dim oShape As Shape
Dim lHort As Double
  For Each iShape In ThisDocument.InlineShapes
    Set oShape = iShape.ConvertToShape
    lHort = oShape.Anchor.Information(wdHorizontalPositionRelativeToPage)
    MsgBox lHort
  Next

that will display the horizontal anchor

if you want to keep the inlineshapes [because they can wrap text around them] then maybe someone else has an idea
0
 
LVL 4

Author Comment

by:vblycos
ID: 9618693
Thanks bruintje..I used your solution of shapeobjects....that seems to be giving fair results sofar...Thanks!

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
In case Office 2010 has not been deployed in your environment, this article may be quite useful. In our office, we wanted a way to deploy Microsoft Office Professional Plus 2010 through an automated batch file via logon script. This article is docum…
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now