Solved

Anchor Position of pictures

Posted on 2003-10-23
2
534 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes a serious pitfall that can happen when deleting shapes using VBA.
This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

623 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