Solved

getting position of paragraph range in powerpoint 2010 vba

Posted on 2014-01-07
1
796 Views
Last Modified: 2014-01-07
Have the follwoing code:

pptSlide.Shapes.Range(2).TextFrame.TextRange.Paragraphs(3).text = vbNewLine & "Priority:     1     2     3"

Based on a query I need to draw a red box around either the 1, 2, or 3 on the slide.  How can i get the x and y of the paragraph(3) to do so?  Unless there is an alternative method that is easier :)
0
Comment
Question by:HyperBPP
[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
1 Comment
 
LVL 23

Accepted Solution

by:
JSRWilson earned 500 total points
ID: 39762563
Dim otxR As TextRange
Dim myBox As Shape
Set otxR = pptSlide.Shapes.Range(2).TextFrame.TextRange.Paragraphs(3)
Set myBox = pptSlide.Shapes.AddShape(msoShapeRectangle, Left:=otxR.BoundLeft, _
Top:=otxR.BoundTop, _
Width:=otxR.BoundWidth, _
Height:=otxR.BoundHeight)
myBox.Fill.Visible = False
myBox.Line.ForeColor.RGB = vbRed

NOTE because you added a NewLine the box may draw around the blank newline! You may need to change the paragraph number to 4
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

624 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