C
Cumulous
Hi! I need a VBA Macro that will process a selected section of text as
Quoted Text - similar to how email programs do it when you Reply to a Plain
Text message.
Basically, it needs to take a selected section of text and prefix every
line with a ">" character, whether the selected lines have a Line Break at
the end, or if they are simply wrapped around the next line.
Creating a Macro that prefixes a single line of text is easy:
-------------------------------
Sub QuoteLine()
Selection.HomeKey Unit:=wdLine
Selection.TypeText Text:=">"
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.HomeKey Unit:=wdLine
End Sub
---------------------------------
But I don't know how to alter this code so that it processes a selected
section of text.
Can anyone help?
Thanks!
Quoted Text - similar to how email programs do it when you Reply to a Plain
Text message.
Basically, it needs to take a selected section of text and prefix every
line with a ">" character, whether the selected lines have a Line Break at
the end, or if they are simply wrapped around the next line.
Creating a Macro that prefixes a single line of text is easy:
-------------------------------
Sub QuoteLine()
Selection.HomeKey Unit:=wdLine
Selection.TypeText Text:=">"
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.HomeKey Unit:=wdLine
End Sub
---------------------------------
But I don't know how to alter this code so that it processes a selected
section of text.
Can anyone help?
Thanks!