Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-04-2013, 04:18 PM
redzan redzan is offline macro to delete a list of autocorrect entries Windows 7 32bit macro to delete a list of autocorrect entries Office 2003
Advanced Beginner
macro to delete a list of autocorrect entries
 
Join Date: Feb 2012
Posts: 37
redzan is on a distinguished road
Default macro to delete a list of autocorrect entries

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
Reply With Quote
  #2  
Old 11-04-2013, 05:19 PM
fumei fumei is offline macro to delete a list of autocorrect entries Windows 7 64bit macro to delete a list of autocorrect entries Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

Deleting AutoCorrects is easy. It is a single instruction.
Code:
AutoCorrect.Entries("TheString").Delete
Or in your case:

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
Reply With Quote
  #3  
Old 11-04-2013, 05:36 PM
redzan redzan is offline macro to delete a list of autocorrect entries Windows 7 32bit macro to delete a list of autocorrect entries Office 2003
Advanced Beginner
macro to delete a list of autocorrect entries
 
Join Date: Feb 2012
Posts: 37
redzan is on a distinguished road
Default

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?
Reply With Quote
  #4  
Old 11-04-2013, 08:19 PM
fumei fumei is offline macro to delete a list of autocorrect entries Windows 7 64bit macro to delete a list of autocorrect entries Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

Quote:
Thank you Fumei but I don't really know how to write my own macros.
Then this would be a good place to start.

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.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to delete a list of autocorrect entries Transferring Autocorrect entries from 2010 to 2013 Tegglet Word 2 03-10-2014 06:58 PM
macro to delete a list of autocorrect entries Formatting autocorrect entries 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

Other Forums: Access Forums

All times are GMT -7. The time now is 02:45 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft