Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2007

Tip: Looking for answers? Try searching our database.

Code for undo

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Margaret Upton - 25 Apr 2007 10:03 GMT
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
macropod - 25 Apr 2007 10:55 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.