Double-Underline text
Problem
Word does double-underlined text. Excel does double-underlined text. For all I know, Notepad may do it.
PowerPoint doesn't. Which is annoying.
This macro teaches PowerPoint how to give text a double underline.
Solution
The DoubleUnderline macro below will give selected text a double-underline.
You can change the value off dOffset to alter the distance between underlines.
Be sure to select some text first or it'll give you error messages instead.
The UnUnderline macro will remove underlines on the current slide.
Sub DoubleUnderline() Dim oRng As TextRange Dim lLineCount As Long Dim oLine As Shape Dim dOffset As Double dOffset = 4 ' space between underlines in points ' change if you like With ActiveWindow.Selection.TextRange For lLineCount = 1 To .Lines.Count Set oRng = .Lines(lLineCount) With oRng Set oLine = ActiveWindow.Selection.SlideRange.Shapes.AddLine( _ .BoundLeft, .BoundTop + .Boundheight, _ .BoundLeft + .Boundwidth, .BoundTop + .Boundheight) Call oLine.Tags.Add("Underline", "YES") With oLine.Duplicate(1) .Left = oLine.Left .Top = oLine.Top + dOffset Call .Tags.Add("Underline", "YES") End With End With Next End With End Sub Sub UnUnderline() ' Removes underlines added by DoubleUndies Dim oSh As Shape Dim x As Long With ActiveWindow.Selection.SlideRange(1) For x = .Shapes.Count To 1 Step -1 Set oSh = .Shapes(x) If oSh.Tags("Underline") = "YES" Then oSh.Delete End If Next End With End Sub
See How do I use VBA code in PowerPoint? to learn how to use this example code.