![]() |
#1
|
|||
|
|||
![]() Hello, I need a macro that will automatically delete a list of autocorrect entries. I DO NOT want to delete all of my entries just a select list. It will take a long time to do this manually. I currently have the list in a word document in the following format: Jane Doe=Jane Doe, MD Is there a way to get a Macro to do this? I'm using Word 2003 but would also like a macro to help a friend do the same thing on a newer version of word. Thank you |
#2
|
|||
|
|||
![]()
Deleting AutoCorrects is easy. It is a single instruction.
Code:
AutoCorrect.Entries("TheString").Delete Code:
AutoCorrect.Entries("Jane Doe").Delete So. If you have a list, AND the list is made up of single paragraphs you can: a) build an array of the list and process through it OR b) process through each paragraph in the list with something like: Code:
Dim oPara As Paragraph Dim AC_String As String Code: For Each oPara In ActiveDocument.Paragraphs AC_String = Left(oPara.Range.Text, InStr(1, oPara.Range.Text, "=") - 1) AutoCorrect.Entries("AC_String").Delete Next |
#3
|
|||
|
|||
![]()
Thank you Fumei but I don't really know how to write my own macros. I just need something I can paste into visual basic and try. Can you give me the whole thing all put together so I can paste it in and try it out?
|
#4
|
|||
|
|||
![]() Quote:
Take the lines I posted and put them between a Sub and a End Sub. Something like: Sub YourNameOfTheSubRoutine() the lines of code here End Sub and paste it into the VBE. You have to put it in the document with the list - unless you want to tell the code to work with another document file. |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Tegglet | Word | 2 | 03-10-2014 06:58 PM |
![]() |
Ray1853 | Excel | 3 | 02-22-2013 07:59 PM |
How are you meant to print added AutoCorrect entries? | anon93 | Word | 1 | 03-27-2012 11:11 PM |
Autocorrect entries with astrix at the end | dswapp | Word | 2 | 02-14-2011 09:34 AM |
Using Word autocorrect and autotext entries in outlook | dswapp | Outlook | 2 | 11-24-2010 10:18 AM |