#1
|
|||
|
|||
VBA: how to get just header text, without formatting codes
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 &"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. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convert raw field codes to plain text and back again | ugcheleuce | Word VBA | 3 | 02-14-2017 05:03 AM |
Converting field codes to plain text | Jennifer Murphy | Word | 6 | 08-20-2014 05:10 AM |
Codes Popping Up In My Text? | Faedrie | Word | 1 | 11-08-2012 01:00 AM |
Field codes appearing in header/footer/TOC instead of actual text | hgilberg | Word | 2 | 03-16-2012 02:52 PM |
Convert LISTNUM field codes to text | remedios43 | Word | 2 | 07-31-2011 09:21 AM |