D
Dorci
I can't seem to combine the steps in 2 macros. I have Macro1 and Macro2
(below), which both work independently, but when I add the steps from Macro2
to Macro1, only the original portion of Macro1 actually runs.
THIS WORKS:
Sub Macro1()
With ActiveWindow.Selection.ShapeRange
.Height = 43.12
.Width = 719.75
.Left = 0#
.Top = 35.88
.TextFrame.TextRange.Font.Size = 26
End With
End Sub
AND THIS WORKS:
Sub Macro2()
With ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Font
.Color.RGB = RGB(Red:=51, Green:=102, Blue:=153)
End With
End Sub
BUT WHEN I DO THIS:
Sub Macro1()
With ActiveWindow.Selection.ShapeRange
.Height = 43.12
.Width = 719.75
.Left = 0#
.Top = 35.88
.TextFrame.TextRange.Font.Size = 26
End With
With ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Font
.Color.RGB = RGB(Red:=51, Green:=102, Blue:=153)
End With
End Sub
OR THIS:
Sub Macro1()
With ActiveWindow.Selection.ShapeRange
.Height = 43.12
.Width = 719.75
.Left = 0#
.Top = 35.88
.TextFrame.TextRange.Font.Size = 26
.TextFrame.TextRange.Font.Color.RGB = RGB(Red:=51, Green:=102,
Blue:=153)
End With
End Sub
ALL OF THE OTHER LINES WORK, BUT THE FONT COLOR CHANGE DOES NOT.
Any idea why? Thanks in advance.
-Dorci
(below), which both work independently, but when I add the steps from Macro2
to Macro1, only the original portion of Macro1 actually runs.
THIS WORKS:
Sub Macro1()
With ActiveWindow.Selection.ShapeRange
.Height = 43.12
.Width = 719.75
.Left = 0#
.Top = 35.88
.TextFrame.TextRange.Font.Size = 26
End With
End Sub
AND THIS WORKS:
Sub Macro2()
With ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Font
.Color.RGB = RGB(Red:=51, Green:=102, Blue:=153)
End With
End Sub
BUT WHEN I DO THIS:
Sub Macro1()
With ActiveWindow.Selection.ShapeRange
.Height = 43.12
.Width = 719.75
.Left = 0#
.Top = 35.88
.TextFrame.TextRange.Font.Size = 26
End With
With ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Font
.Color.RGB = RGB(Red:=51, Green:=102, Blue:=153)
End With
End Sub
OR THIS:
Sub Macro1()
With ActiveWindow.Selection.ShapeRange
.Height = 43.12
.Width = 719.75
.Left = 0#
.Top = 35.88
.TextFrame.TextRange.Font.Size = 26
.TextFrame.TextRange.Font.Color.RGB = RGB(Red:=51, Green:=102,
Blue:=153)
End With
End Sub
ALL OF THE OTHER LINES WORK, BUT THE FONT COLOR CHANGE DOES NOT.
Any idea why? Thanks in advance.
-Dorci