Link to home
Start Free TrialLog in
Avatar of mmcerlane
mmcerlane

asked on

Macro disappears after restart

I am currently running Word 2003 SP1. I created a macro and put it on a custom toolbar.  The macro is fine as long as I don't shut down my computer. Every time I restart my computer this new macro disappears.  The other macros on the toolbar are available on startup but not this new macro.  What could be the problem?
Michelle
Avatar of Joanne M. Orzech
Joanne M. Orzech
Flag of United States of America image

Are you sure when you created the macro and toolbar, that they were stored in normal.dot?  Also, you may want to remove any global add-in templates from your startup folder (Tools, Options, File Locations - browse to that folder in Windows Explorer and move them temporarily).  Then you can put the add-ins back one by one until you see if they cause the same problem.  

One of them may contain and AutoExec macro or something.

Avatar of mmcerlane
mmcerlane

ASKER

When I created the macro the field "Store macros in:" was defaulted to All documents (normal.dot).

I do not have anything in the StartUp> WWStart folder.

Any other suggestions?
Ok - well - maybe go into the VB Editor (Alt F11) and View, Project Explorer, Click on Normal, Click on Modules, and see if there's any macros in there that might be resetting things.
I went to VB Editor (Alt F11) and View, Project Explorer, Click on Normal, Click on Modules and there is a file called "New Macros".  It looks like a copy of another macro I have.  Can this be deleted?
ASKER CERTIFIED SOLUTION
Avatar of Joanne M. Orzech
Joanne M. Orzech
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You may also want to see this post - although I've pretty much said the same thing:
https://www.experts-exchange.com/questions/21990405/Word-doesn't-save-customized-toolbar-anymore.html
I looked at the code in the New Macro and it contained all the macros in the custom toolbar. So I deleted all the macro code except the macro I wanted and I rebooted and it was there.

Thank you so much.  You are magic!
Wonderful!  I am so pleased!  Thanks very much :)
Sorry, I spoke too soon.  The new macro worked fine but the other buttons on the custom toolbar gave the error message that the macro was deleted.

This is what I did after I realized what happened:
1st I deleted the buttons from the toolbar and recreated the macros and put them back on the toolbar. When I exited Word the toolbar came back, however, when I shut down the computer the old toolbar appeared.

So I went into the VB Editor (Alt F11) and View, Project Explorer, Click on Normal, Click on Modules and I exported the New Macros .bas file to another folder and removed the New Macros folder.

Then I recreated the macros (made sure they were stored in the normal.dot) and recreated the toolbar (made sure that it was available in normal.dot) and went into VB Editor and a New Macro folder was created. Great!

I restarted my computer but the old toolbar came back again.

What is going on that the original normal.dot keeps appearing with a restart of the computer but not the restart of Word?
Well, it sounds like your normal.dot is getting deleted or overwritten every time you reboot.  Are you on a network?  
Yes.
Well, do you have an I.T. Department?  If so, ask them if they're pushing anything on login.

Another thing you can try is chaning the File Location of your normal.dot.
Go to Tools, Options, File, Locations, User Templates -- that's where your normal.dot should be stored.  Change that file location to someplace else and copy the correct normal.dot to the new location.

Restart and try again.
I moved the normal.dot and when I opened Word again I got the message:
The global template, NORMAL.DOT, is already open as an add-in program.
Oh - so that's probably your problem!
In Windows Explorer, browse to your startup folder location (Tools, Options, File Locations, Startup)
If there is a normal.dot there - move it or rename it or delete it.

Try again.
Good luck - I think we're getting close!
I think I have a bigger problem now.  It wiped out all my macros.  I create new ones and saved them in normal.dot but each time I close Word and come back in they're gone.

It also wipes out my new toolbars.  Before it would hold on to my toolbars until I restart my computer, now it wipes them out when I close Word.
This is not normal Word behavior at all.

First of all, normal.dot should not be in the Startup folder.
You should have ONLY ONE normal.dot on your hard drive (search for all instances and either rename or delete).
Write down the location of your user templates (Tools, Options, File Locations).
Put a test macro in the normal.dot and reboot.


What is in your login script?  Something is "wiping" out this info....
mmcerlan
Hello????
Sorry I have been at meetings all day. I will need to get back to you on Monday. I hope that is OK.
Thanks so much for your help. As soon as I get in Monday I will start with your suggestions above.
You're the best!
OK thanks!  LOL - I was confused because your last post just said "mmcerlan"  *smile*
Hi JOrzech, I think something crazy is going on with my machine.  I did as you suggested and searched for all the occasions of normal.dot. There were 2 on my hard drive and over 20 on a "J" drive. I renamed the ones on my hard drive. I didn't do anything with the ones on the J drive. Now that I think about it my problems started when the IT group gave me access to the J drive.

Our network points to the X drive at startup so I made sure there was only one in that folder. I created a new macro but did not put it on a toolbar. I rebooted.  My macro and all the old macros appeared.  Yeah. Now I go to re-create the toolbar.  The old toolbar was in the list so I checked it and added my new macro to it.  I rebooted.  The toolbar and all the macros were gone. Boo! So I closed Word and reopened it.  The old toobar and the macros were there.

Should I go to the IT group at this point?  Do you think I should have Word re-installed on my machine? Do you think this will solve the problem?
Well - can you post your macro because you're right, something is definitely amiss.  Simply because you attach your macro to a toolbar, everything shouldn't disappear.  

And I assume that your startup folder is pointing to X drive?  You can confirm this by going to Tools, Options, File Locations, Startup.....
Yes it is pointing to the X drive. I can post my macro but its not just this macro, it's any macro I create.  Here is the one that I just created. I made it simple just to test it.

Sub SingleSpace()
'
' SingleSpace Macro
' Macro recorded 1/18/2007 by Michelle McErlane
'
    Selection.WholeStory
    With ActiveDocument.Styles(wdStyleNormal).Font
        If .NameFarEast = .NameAscii Then
            .NameAscii = ""
        End If
        .NameFarEast = ""
    End With
    With ActiveDocument.PageSetup
        .LineNumbering.Active = False
        .Orientation = wdOrientPortrait
        .TopMargin = InchesToPoints(0.5)
        .BottomMargin = InchesToPoints(0.5)
        .LeftMargin = InchesToPoints(0.5)
        .RightMargin = InchesToPoints(0.5)
        .Gutter = InchesToPoints(0)
        .HeaderDistance = InchesToPoints(0.5)
        .FooterDistance = InchesToPoints(0.5)
        .PageWidth = InchesToPoints(8.5)
        .PageHeight = InchesToPoints(11)
        .FirstPageTray = wdPrinterDefaultBin
        .OtherPagesTray = wdPrinterDefaultBin
        .SectionStart = wdSectionNewPage
        .OddAndEvenPagesHeaderFooter = False
        .DifferentFirstPageHeaderFooter = False
        .VerticalAlignment = wdAlignVerticalTop
        .SuppressEndnotes = False
        .MirrorMargins = False
        .TwoPagesOnOne = False
        .BookFoldPrinting = False
        .BookFoldRevPrinting = False
        .BookFoldPrintingSheets = 1
        .GutterPos = wdGutterPosLeft
    End With
    With Selection.ParagraphFormat
        .LeftIndent = InchesToPoints(0)
        .RightIndent = InchesToPoints(0)
        .SpaceBefore = 0
        .SpaceBeforeAuto = False
        .SpaceAfter = 0
        .SpaceAfterAuto = False
        .LineSpacingRule = wdLineSpaceSingle
        .Alignment = wdAlignParagraphLeft
        .WidowControl = True
        .KeepWithNext = False
        .KeepTogether = False
        .PageBreakBefore = False
        .NoLineNumber = False
        .Hyphenation = True
        .FirstLineIndent = InchesToPoints(0)
        .OutlineLevel = wdOutlineLevelBodyText
        .CharacterUnitLeftIndent = 0
        .CharacterUnitRightIndent = 0
        .CharacterUnitFirstLineIndent = 0
        .LineUnitBefore = 0
        .LineUnitAfter = 0
    End With
End Sub
 
Well - I guess I would definitely check with your I.T. Department because they may have login scripts in place that are overriding what you're doing.  That sounds to me like the most logical explanation of why this is happening.

Good luck - let me know.  :)
Joanne
Thanks, I'll definitely let you know if they solve my dilemma.  Thanks for all your help and patience.
Michelle
Anytime Michelle - although I don't feel like I've been much help :)  Thanks.
You have been fabulous.  I learn much from my mistakes with direction from great IT people like you.
How very kind of you to say that!  Thank you so much!