A community of 30,000 US Transcriptionist serving Medical Transcription Industry


macro to automatically correct numbered list - anon


Posted: Dec 09, 2012

Hey guys, this is for all the editscript users or people who can't use the auto list function in word.  This macro will run through a list that looks like this:

2.  cat.

9.  dog

10. bird.

2.  fish.

and corrects the numbers to look like this:

1.  cat.

2.  dog.

3.  bird.

4.  fish.

 

It stops after the list so nothing else gets changed. 

 

To use it, create an empty macro and assign a hot key.  Then go in to edit the macro and copy/paste the code. 

So your macro will look like

----------------------------------------------------------------------

Sub Macro(some number or if you named it whatever name) ( )

paste the code here

End sub

-------------------------------------------------------------------------------

 

Then to test, you make a list.  Insert your cursor like this

(cursor here)1.  cat

then use your hot-key to invoke the macro.  A popup comes up and asks where to start numbering, since you are on number one of the list type one, hit enter.  If you had your cursor at #3 in the list you would type 3.  The only catch is you have to have some number and a period for every item in the list.  It can't look like this. 

1. cat.

bird.

3.  fish.

 

 

Here's the code to copy/paste. 

 

    Application.ScreenUpdating = False 
    Dim Rng As Range, Para As Paragraph, i As Long 
    Dim r As Range 
    i = 1 
    On Error Goto ErrExit 
    Set r = ActiveDocument.Range(Start:=Selection.Start, _ 
    End:=ActiveDocument.Range.End) 
    With r 
        Set Rng = .Paragraphs.First.Range.Words.First 
        If Trim(Rng.Text) Like "#" Or Trim(Rng.Text) Like "##" Then 
            i = Trim(Rng.Text) 
        End If 
        i = CLng(InputBox("Please enter the starting number", "Paragraph re-numbering", i)) 
        For Each Para In .Paragraphs 
            Set Rng = Para.Range.Words.First 
            Rng.End = Rng.End + 1 
            If Rng.Text Like "#." Or Rng.Text Like "##." Then 
                Rng.Text = i & "." 
                i = i + 1 
            Else 
                Exit For 
            End If 
        Next 
    End With 
ErrExit: 
    Application.ScreenUpdating = True 

AWESOME!!!!! - sm

[ In Reply To ..]
Sorry about the hyperbolic caps, but I can hardly say how much I love this! Are there more like this? I've tried making similar with a free little hotkey program I use a lot for similar kinds of things in ES and also with a macro, but I've never got renumbering to work properly. Please e-mail me if there are more macros like this to be found elsewhere. Thank you, thank you, thank you!

Thanks! - Slock

[ In Reply To ..]
Thanks!


Similar Messages:


Capitalize First Letter In Numbered List
Apr 16, 2015

  I already have Capitalize the first sentence checked in Autocorrect.  Has anyone created a macro to automatically captialize the first letter of each item in a numbered list? Would so appreciate it. ...


BEFORE YOU POST: Use The Correct Board - List Is On The Left. NM
Jan 26, 2011

nm ...


BEFORE YOU POST - Make Sure You Use The Correct Board - See List On Left. NM
Feb 23, 2011

. ...


Days Are Numbered
Feb 04, 2010

This is probably the last time I'll post on this forum--finally moved on from the Q this last week and start with another company Monday.   The relief I felt leaving MQ was palpable.   Our profession is doomed.  And I say that not to be a frowny Fannie, but because it's a fact staring us all in the face. The problems with the Q , although vexing, are not what we have to worry about.  Well, we do, but what is going to phase us all out is the electronic medical reco ...


Audio Automatically Going To End
Nov 15, 2012

I just started my shift and the first 2 jobs I've downloaded the audio goes all the way to the end the minute I press the footpedal.  I had to abandon both jobs.  I shut down my computer and it did the same thing.  Anybody else ever experience that? ...


How To Make A Numbered Sublist In Fluency For Transcription 7.2.1.635
Oct 05, 2013

I have one dictator who likes making sublists.  I know how to make a list using Ctl + Shf + l to make bullets but don't remember how to make sublists (indented with bullets) or even sublists below sublists.  I've looked all over the tutorials but can't seem to find it.  Does anyone know how to do it? ...


Unofficial Poll - Escription Numbered Lists
Apr 24, 2014

I am just curious. About what percentage of lists that appear in your reports numbered, as in past medical history or medications, comes out correctly? I am guessing that with medications specifically, which I think it does a horrid job at, about 2 or 3 times a day out of about 20 reports, the list will come out correctly. The majority however is completely messed up, double numbers, wrong medications, etc. I can't believe what a piece of work voice wRECk is?! When I see the advert ...


On Google Chrome, Is There A Way To Automatically Delete
Feb 04, 2010

nm ...


Automatically Logging Demographic Information
Nov 16, 2012

I'm trying to eliminate redundant work.  Is there a way to populate a document in Excel with demographic information entered in a patient's typed Word report?  Any thoughts or advice on tracking/logging typed work would be appreciated.  Thanks in advance.  ...


Is There A Way For A Document To Automatically Scroll As You Type
Nov 18, 2013

Don't know if that is a possible feature in MS Word.  I'm typing a document and it doesn't scroll.  Next thing I know I'm looking down at the bottom of my monitor then using the mouse to move it up. Wonder if there is a feature and if anyone know how to do it so that document will scroll up as I'm typing so I will always be looking directly in front of me. ...


AAMT Book Of Style - Medications Numbered And Listed?
Apr 07, 2010

According to AAMT Book of style, are medications numbered and listed?? ...


Emdat Inscribe - Adjust How Much The Dictation Automatically Rewinds
Jul 11, 2012

Hi, Just learning this platform now..  Is there a way to adjust how much the dictation automatically rewinds when you press the foot pedal?  It's too much now.  I printed out the manual and went through the tutorial but I don't remember what they said about this.  What do you all think about the Inscribe platform?  I'm used to something very different, so it seems like a challenge to me. TIA ...


Microsoft Word Where It Doesn't Automatically Make The Numbers Indent
Jan 05, 2011

I'm trying to help someone with her Word problems.  How do you get it to where it doesn't automatically make the numbers indent when you're numbering something?  I've tried the Bullets and Numbering and the Styles and Formatting, and she says neither changes it.  TIA ...


Short Cut For List Punctuation In A Drug List? (Fluency)
Dec 06, 2014

Is there is quick way to add commas between items in a list? Of course, using Ctl K in front a word will change the punctuation, but it will also change a capitalized drug to lower case, and you will still have to get to the beginning of the next drug which will require 2 Ctl arrows and backspace. Ctl arrow takes you to the beginning of the next word, but you will have to backspace to put in the comma. Adding punctuation to lists is so time consuming! ...


Macro Help!!! Please!!!
Oct 27, 2014

Hi:  I am hoping someone can help me with the above.  I don't have much experience in the macro tools (although I have one to jump from field to field).  This doctor is a psychiatrist who examines a client and then reports his findings sometimes to attorneys. He constantly in his report will want to quote and bold a statement or set of statements even within the same sentence.  So he will say, Mr. ?? said quote bold blah, blah blah quote unbold, and then stated again quo ...


MS Word Macro Help
Jun 02, 2010

It has been so long since I needed to do this - the macro to do this is on a long dead computer.  I am creating macros for particular reports.  After the heading and the :  I would space twice and put a /.  I had a macro that was called by the person who created it originally I suppose, pause.  I copied that macro (named it pause) as a separate macro and assisgned it a keystroke (let's say F5).  Then when I pulled up say the op note macro, to move to the next f ...


Any Macro Experts?
May 14, 2013

So I have all these templates to pull into a single document all the time depending on what the patient is being seen for.  I also have to put the name, dob, etc, in a particular place in all of these templates.  Is there anyway to make a macro that will ask me the pertinent info up front and then when done it all just populates ready for me to just type?  This is in Word by the way. ...


Help With Macro For Word 2002/XP
Jun 09, 2010

Hey everyone. Why is my macro disappearing everytime I close word?  I don't normally use macros but for this instance I am.  I just created a simple macro by going into Tools, make new macro, etc.  I test it out on word and it works.  When I close out the word program and bring it back up and run that macro I just created it is not there.  I'm not well versed with macros so I wrote down that it was saving it as a normal.dot (global template).  Can anyone ...


Word Expander Or Macro?
Nov 20, 2010

Which is better? What are the differences? I have been using macros in MS Word. I downloaded a trial version of a shorthand program once, but it was a little confusing and it seemed much more involved than recording a macro. Any advice/opinions appreciated! ...


MS Word Macro Question
May 16, 2011

I've been having problems with my macros "sticking."  I'll make one, and the next day it doesn't work.  I'll go into the list of macros and it'll still be there, but the command won't work. I just made one that removes the cc line if it isn't used. I'm curious to see if it's still there when I log back in tomorrow.  Any idea why this happens?  I was a pro at editing my macros in the dinosaur days of DOS but not now, so I don' ...


Macro To Add Drug To AutoCorrect
Feb 16, 2013

  (risedronate sodium) tablets Sub ChangeControl1Key() CustomizationContext = ActiveDocument.AttachedTemplate KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyControl, wdKey1), _     KeyCategory:=wdKeyCategoryMacro, Command:="AddMedToAutoCorrect" End Sub Sub AddMedToAutoCorrect() Dim BrandString, GenericString, Title, Message, LittleString Title = "WordExpress Transcriptions" Message = "Type in brand name of medication as you would like it " _ & "to appear in your text:" ...


PC SHORTHAND - Make A Macro?
Mar 30, 2013

Hey everyone, I am new to shorthand.  I was hoping someone could help me make a macro.  I am trying to make a macro for ALT+L, D.  I know how to do key control and then pick a key, but staring with ALT has me confused.  I would appreciate any help.  Thank you. ...


Shorthand Macro Question
Sep 16, 2013

I am new to Shorthand.  Is there a macro for putting an automatic space after a comma, semicolon, etc.?  I have ones someone else wrote for two spaces after periods.  So far I am not that great at making my own macros.  I have registered at Productivity Talk and follow the SH forum, but am not allowed to look at the posts I really need.  I get an error message that I don't have permission and the admin hasn't responded back yet. ...


Need Help With A Certain Macro/expander In Editscript
Aug 20, 2013

I am trying to make a macro/expander for "-year-old" and in order for the expander to work right it needs a backspace but I don't know how to put a backspace in. Can anyone please tell me how. ...


Calling Macro Diva
Sep 29, 2013

Just wondering if it's okay/possible to put my "Call" macros back towards the end of General_Macro? And if so, where?  I tried moving them to just before End Sub and also before Page 1:Selection..., but those locations didn't work.  I'm getting an occasional errant "g" or "L" (apparently related to the GramLiter macro) at the very beginning of my VR text when I run it now, which I didn't have at all before when the "called' macros were at the end.  Was part of the fix ...


Paging Macro Diva
Jan 19, 2014

Would enjoy talking with Macro Diva about all things macro!  I've written one big macro with which I preprocess virtually all of my transcribed documents.  First, it identifies the document template type, e.g., office note, letter, hospital discharge, echocardiogram, PV study, etc.  It then displays a dialog box with drop-down lists from which I select the ordering physician, dictating physician, date of study, date dictated. etc.  (The date of transcription is, of ...


Calling On Macro Diva Again, If You're Still About.
May 15, 2014

I don't know where to begin with trying to record a macro for this need myself.  On my main account, we're required to list meds without any following punctuation, but due to other MTSOs also subbing on it (who apparently don't have any specs or just don't have to follow the same specs we do), the lists invariably come through on VR with totally inconsistent punctuation.  Such as this: MEDICATIONS:Ativan,ZofranDexamethasone.DiltiazemLanoxin. But should be this: M ...


Word Macro Suggestions
Jun 12, 2014

Hi, I was wonder what program you would suggest for a macro program for Word 2003.   If there is a free version, that would be helpful; but any good program would be good. Thank you or your help, Diane :) ...


Macro In Word To Go Back And Capitalize Something?
Apr 20, 2010

Every once in a while my shift key doesn't take and I have a sentence started without a capital letter.  Is there an way to create a macro that can go back and do that so that I don't have to either backspace out or stop and go back and correct and then carry on? I'm thinking to do a find function to go find the last period and then tell it to skip to the next letter, but I'm not entirely sure how that would go. If anyone's got any suggestions, I'd really app ...


Creating A Jump Macro On Radnet
Sep 20, 2010

I use Radnet...Can anyone tell me how to create and use a jump macro for this program?  I have asked at my company but no one knew what a 'jump macro' was.  Perhaps called something else?  I know how to do it in Word but havent figured it out yet for Radnet.  Thanks. ...