I had been racking my brains to think what the delete key command was -
Renaming the macro works just fine
Sub EditClear()
If InStr(Selection.Text, Chr(13)) Then
Selection.Text = Replace(Selection.Text, Chr(13), " ")
End If
Selection.Delete
End Sub
--
Graham Mayor - Word MVP
My web site
www.gmayor.com
Word MVP web site
http://word.mvps.org
Lene Fredborg wrote:
Possible solution:
The command executed when pressing the Delete key is EditClear. You
could rename the deletion macro to EditClear and it will run instead
of the built-in command.
Thanks all - I have already updated my macros to replace paragraphs
marks with spaces and that does work, of course. However, for my
users, they still have the pain of having to perform the selection
delete and then delete the inserted paragraph mark when they do this
manually.
Surely, Microsoft can't believe that "delete this bit" means "We'll
delete it but add something in because you will always need it and,
no, you can't switch this off"???
Andy
"Graham Mayor" wrote:
Greg Maxey wrote:
How about:
Sub ScracthMacro()
If InStr(Selection.Text, Chr(13)) 1 Then
Selection.Text = Replace(Selection.Text, Chr(13), " ")
Selection.Delete
End If
End Sub
Sub ScratchMacro()
If InStr(Selection.Text, Chr(13)) Then
Selection.Text = Replace(Selection.Text, Chr(13), " ")
End If
Selection.Delete
End Sub
Would delete the selected text whether or not the selection
contained a paragraph break which is closer to the Word 2003
behaviour.
--
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org