Microsoft Word 2010 Macro stops working when I close and reopen Word

I am using Microsoft Office 2010, specifically Word 2010. My client wants a button to click to print the current page.

I open Word, I begin recording a macro by adding a button on the Quick Access Toolbar,
I Left Click File, I Left Click Print, I Left CLcik the Drop Down Menu for Current Page, I Left Click Print
Then I Stop Recording.

If I remain in Word the button works fine, If I exit and re-open Word, the Macro does nothing.

I must be skipping something really basic, can anyone help with this?

Not sure if this is relevant but the owner of company may have pointed to a normal.dotm on a network share, in other words he may have changed the default template location.
nrgtaskmasterAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GrahamSkanRetiredCommented:
Recorded macros can be the basis of repeatable code, but they may well be dependent on context-specific factors.

As a start, I suggest that you post the code that works the first time, and not subsequently.

Note that if you can simplify it, diagnosis will be faster. In fact, sufficient simplification might enable you to spot the problem yourself.
0
nrgtaskmasterAuthor Commented:
Hi GrahamSkan,

The actual code is simply:

Sub PCP()
'
' PCP Macro
' Print Current Page
'
End Sub


I feel pretty confident that the problem is that the Owner loaded up an old 97/2003 Normal.dot. When the workstations were "freshly installed" the macro worked. Owner tweaked and pointed Word to an old Normal.dot and Macro stuff went south.
0
nrgtaskmasterAuthor Commented:
Additionally, I note that the new default template location is on a network drive. I just added this location to "trusted locations" but can't check if this is the solution for about another hour...
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

DrTribosCommented:
Hi - can you save the macro to a different template and save that template in the MS Word startup folder.  As a general rule macros should not be stored in the Normal template (for reasons as the one you've just discovered).

Cheers,

PS G'day Mr Skan :-)
0
nrgtaskmasterAuthor Commented:
Sure Dude (can save to different template), now I have to Google about what the MS Word Startup Folder is, I apologize - I am a platform provider - want to virtualize a bunch of servers?, no problem, install Windows and Linux cohabitating comfily, no problem. User applications however are not my forte.
0
DrTribosCommented:
Ahhh... you can find it from the word options I'll check exactly...
0
DrTribosCommented:
File > Options > Advanced > scroll to bottom "General" > File Locations (button)
0
GrahamSkanRetiredCommented:
Leaving it to you Steve (Dude!!!). It's my bed-time.
0
nrgtaskmasterAuthor Commented:
Wife and daughter have been to a horse show for the past 6 days, first dinner together tonight and I am grilling, I must take a break, gotta see my women! Thanks everyone, I'll be back at this in 9:30 PM or so EST, and looking into the startup folder.
0
DrTribosCommented:
Whoa! That's a long horse show!  Enjoy the grill...  

Sleep well Mr Skan

Um... BTW unless I'm only seeing half the thread, that macro is empty...

The missing line of code would look like:
activedocument.PrintOut Range:=wdprintcurrentpage

Open in new window


*Rant* Word managed to break the macro recorder... it's not what it used to be... *Rant*
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.