Solved

Anchor Position of pictures

Posted on 2003-10-23
2
533 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My experience with Windows 10 over a one year period and suggestions for smooth operation
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

751 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