A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

TextRange



 
 
Thread Tools Display Modes
  #1  
Old July 9th, 2008, 02:35 PM posted to microsoft.public.powerpoint
[email protected]
external usenet poster
 
Posts: 22
Default TextRange

Is there any methods to finding left position of each textrange from
collection(..through pro grammatically)
say i have one long text having different fonts ,I use Runs method to
getting each textrange. but if i call BoundLeft
it is giving same position(left most textrange's) is there any way to
get each textrange's left..or any other tricks?
thanks in advance..


  #2  
Old July 9th, 2008, 05:00 PM posted to microsoft.public.powerpoint
Steve Rindsberg
external usenet poster
 
Posts: 9,366
Default TextRange

In article ,
wrote:
Is there any methods to finding left position of each textrange from
collection(..through pro grammatically)
say i have one long text having different fonts ,I use Runs method to
getting each textrange. but if i call BoundLeft
it is giving same position(left most textrange's) is there any way to
get each textrange's left..or any other tricks?
thanks in advance..


Sub BoundingAlongMerrily()

Dim oRng As TextRange
Dim x As Long
Dim oSh As Shape

Set oSh = ActiveWindow.Selection.ShapeRange(1)
For x = 1 To oSh.TextFrame.TextRange.Runs.Count
Set oRng = oSh.TextFrame.TextRange.Runs(x)
Debug.Print oRng.BoundLeft
Next

End Sub

That works in VBA/PPT2003. Give it a try in 2007; perhaps there's a bug there
that prevents it from working properly.


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


  #3  
Old July 11th, 2008, 07:33 AM posted to microsoft.public.powerpoint
[email protected]
external usenet poster
 
Posts: 22
Default TextRange

thanks sir ..,
it was my programming misake mistake..getting value properly in 2007
also..i have one more doubt
any call to get left value of textrange while playing slideshow? i
mean instead of getting left value from power point window,any chance
to get from Slideshow window?any trick??
  #4  
Old July 11th, 2008, 04:12 PM posted to microsoft.public.powerpoint
Steve Rindsberg
external usenet poster
 
Posts: 9,366
Default TextRange

In article ,
wrote:
thanks sir ..,
it was my programming misake mistake..getting value properly in 2007
also..i have one more doubt
any call to get left value of textrange while playing slideshow? i
mean instead of getting left value from power point window,any chance
to get from Slideshow window?any trick??


The same code should work, except that you'd need to access the text box by
name, index or some other method (tags or text content for example). Since you
can't select anything in slide show view, using the current selection won't
work.



-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:46 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.