Re: How to Get Text X, Y position?
- From: Steve Rindsberg <abuse@xxxxxxxxxxxxx>
- Date: Mon, 28 Jul 2008 11:18:02 EDT
In article <d695d13c-2b5a-4003-b727-d130501f1aba@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
wrote:
Hi All,
I am writing an application which will export power point slide
content into a text file. I am iterating through all shapes and
getting each textRange(from textFrame). From textRange getting text
and font style.Everything is working fine except text x, y position.
To get text X-position i am using text range's BoundLeft function and
for Y-Position I am using text range's BoundTop function. Both
functions are returning value in Points. How to convert this into
pixels?
Pixels where? The value will depend on the resolution of the screen you're
showing the presentation on, so you'd have to call a WinAPI function to get
that info. From there it'd be a relatively simple ratio calculation IF the
slide size and screen size are of the same proportions. Otherwise you'll have
to work out some offsets.
And BoundTop is always returning same value for different
TextRanges(Font and Font size is different). How to get X, Y position
of the each textRange?
Can you post some example code that demonstrates this?
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Live and in personable in the Help Center at PowerPoint Live
Sept 21-24, San Diego CA, USA
www.pptlive.com
.
- Follow-Ups:
- Re: How to Get Text X, Y position?
- From: bapujimoka . dj
- Re: How to Get Text X, Y position?
- References:
- How to Get Text X, Y position?
- From: bapujimoka . dj
- How to Get Text X, Y position?
- Prev by Date: Re: hyperlink
- Next by Date: Re: PowerPoint 2007 crashes
- Previous by thread: How to Get Text X, Y position?
- Next by thread: Re: How to Get Text X, Y position?
- Index(es):
Relevant Pages
|