Could anyone tell me what the code would be for undo. I can only record
macros and put in bits of code that I know. I want a macro to copy selected
text change it to upper case so that I can switch documents and paste, but I
want the text I have changed to upper case to revert back and the macro
record will not let me undo the changes, so could anyone give me the line of
code please. I would be very grateful for some help.
Margaret
Hi Margaret,
Try:
Application.Undo
For future reference, Word's VBE Help file is a good place to look for pointers on whatever you might want to (un)do.
Cheers

Signature
macropod
[MVP - Microsoft Word]
-------------------------
> Could anyone tell me what the code would be for undo. I can only record
> macros and put in bits of code that I know. I want a macro to copy selected
[quoted text clipped - 4 lines]
>
> Margaret
Margaret Upton - 25 Apr 2007 12:25 GMT
Thanks for your reply, but it does not work, it highlights the Undo when you
go into the macro.
Margaret
> Hi Margaret,
>
[quoted text clipped - 13 lines]
>>
>> Margaret
Stefan Blom - 25 Apr 2007 13:22 GMT
Try ActiveDocument.Undo instead.

Signature
Stefan Blom
Microsoft Word MVP
> Thanks for your reply, but it does not work, it highlights the Undo when you
> go into the macro.
[quoted text clipped - 18 lines]
> >>
> >> Margaret
Margaret Upton - 25 Apr 2007 14:42 GMT
Thank you so much, that works.
Margaret
> Try ActiveDocument.Undo instead.
>
[quoted text clipped - 27 lines]
>> >>
>> >> Margaret
Stefan Blom - 26 Apr 2007 09:27 GMT
You are welcome.

Signature
Stefan Blom
Microsoft Word MVP
> Thank you so much, that works.
>
[quoted text clipped - 31 lines]
> >> >>
> >> >> Margaret