Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / September 2006

Tip: Looking for answers? Try searching our database.

Change font on selected text

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Elmar - 20 Sep 2006 01:18 GMT
I've recorded a macro converting selected text to superscript. This
works fine, as long as the desired changes are always in the same
relative position on a slide. How should I change the macro that the
current text selection is being dealt with rather than the recorded
one? In other words, how can the "Start" and "Length" values reflect
the current selection?

Thanks in advance

Elmar

Sub SupNormal()
'
' Macro recorded 20.09.2006 by Elmar von Muralt
'

ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=122,
Length:=3).Select
   With ActiveWindow.Selection.TextRange.Font
       .Name = "Arial"
       .Size = 32
       .Bold = msoFalse
       .Italic = msoFalse
       .Underline = msoFalse
       .Shadow = msoFalse
       .Emboss = msoFalse
       .BaselineOffset = 0.3
       .AutoRotateNumbers = msoFalse
       .Color.SchemeColor = ppForeground
   End With
End Sub
Shyam Pillai - 20 Sep 2006 03:11 GMT
Elmar,

Delete the  following line:
> ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=122,
> Length:=3).Select
The rest will work only on the active text selection.

Signature

Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm

> I've recorded a macro converting selected text to superscript. This
> works fine, as long as the desired changes are always in the same
[quoted text clipped - 27 lines]
>    End With
> End Sub
Elmar - 20 Sep 2006 03:24 GMT
Thankyou very much Shyam,

It works like a charm :o)

Kind regards

Elmar

> Elmar,
>
[quoted text clipped - 41 lines]
> >    End With
> > End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.