I am trying to get the text from the LeftHeader, using the following code:
Code:
Sub Header()
MyLeftHeader = ActiveSheet.PageSetup.LeftHeader
Debug.Print MyLeftHeader
End Sub
Trouble is, in addition to the text, I end up with all of the formatting codes, as follows, for example:
&"Arial,Bold"&12Hello World.
Is there a way to get
just the text, without the codes, as if I were to click into the header, select the text, and copy it?
I already have a macro to strip out the codes, so I don't need another -- I'm just wondering if there's a simpler way to get the text.