Word macros stopped working after update

S

secretdubai

Since a recent udpate that Office prompted me to do, none of my Macros
work - they have all disappeared. And no new ones I record seem to work
either.

The Macro I am absolutely desperate to recreate is one that does a
plain text paste. Previously I had one that looked like this:

Sub PlainPaste()
' PlainPaste Macro
Selection.PasteSpecial Link:=False, DataType:=wdPasteText,
Placement:=_wdlnLine, DisplayAslcon:=False
End Sub

It no longer works, and I get a Syntax Error. I tried re-recording one
(by going to Edit:paste Special:paste as Unformatted Text) but it
doesn't work either. When I perform the action during recording, it
does a plain text paste. When I try to run the Macro, all the original
formatting is still there. This is what the new Macro looks like:

Sub Macro1()
' Macro1 Macro
Selection.PasteAndFormat (wdPasteDefault)
End Sub

If someone could help I would be really grateful, I am desperate to get
this working again. I used to map it to Command+V effectively making my
regular paste a plain text/unformatted one. Now I'm stuck using Menus
again.

(I also posted this at MacFixitForums, then saw the link to this group).
 
E

Elliott Roper

secretdubai said:
Since a recent udpate that Office prompted me to do, none of my Macros
work - they have all disappeared. And no new ones I record seem to work
either.

The Macro I am absolutely desperate to recreate is one that does a
plain text paste. Previously I had one that looked like this:

Sub PlainPaste()
' PlainPaste Macro
Selection.PasteSpecial Link:=False, DataType:=wdPasteText,
Placement:=_wdlnLine, DisplayAslcon:=False
End Sub

It no longer works, and I get a Syntax Error. I tried re-recording one
(by going to Edit:paste Special:paste as Unformatted Text) but it
doesn't work either. When I perform the action during recording, it
does a plain text paste. When I try to run the Macro, all the original
formatting is still there. This is what the new Macro looks like:

Sub Macro1()
' Macro1 Macro
Selection.PasteAndFormat (wdPasteDefault)
End Sub

If someone could help I would be really grateful, I am desperate to get
this working again. I used to map it to Command+V effectively making my
regular paste a plain text/unformatted one. Now I'm stuck using Menus
again.

(I also posted this at MacFixitForums, then saw the link to this group).

Your first macro is absolutely perfect for your needs.
(well, it matches the one I recorded to do the same job)

I have no idea how you lost it during the update process.
If all else fails, climb into tools » macro » macros... choose your new
one then edit it to be the same as your original.

Somehow you seem to have recorded the new one to paste formatted. You
might like to try recording it again, this time without stopping
recording and starting it again. (my wild guess for how you got the
recording wrong)
 
D

Daiya Mitchell

Somehow you seem to have recorded the new one to paste formatted. You
might like to try recording it again, this time without stopping
recording and starting it again. (my wild guess for how you got the
recording wrong)

The macro recorder is broken in Word 2004 for things involving paste special
(and I believe was broken in earlier versions too, though not sure). An
alternate Paste Unformatted macro is linked below, if necessary.

Paste Text Macros
http://word.mvps.org/Mac/PasteText.html
 
D

Daiya Mitchell

Since a recent udpate that Office prompted me to do, none of my Macros
work - they have all disappeared.

My guess would be that something happened to the Normal template, where
macros are saved by default. An update should NOT cause this, but that
would fit the symptoms.

More about Normal--perhaps you might be able to switch in a backed up copy?
http://word.mvps.org/mac/MacWordNormal.html
And no new ones I record seem to work
either.

No idea what might cause that. Can you give more info about how recording,
how they don't work?
The Macro I am absolutely desperate to recreate is one that does a
plain text paste. Previously I had one that looked like this:

Sub PlainPaste()
' PlainPaste Macro
Selection.PasteSpecial Link:=False, DataType:=wdPasteText,
Placement:=_wdlnLine, DisplayAslcon:=False
End Sub
It no longer works, and I get a Syntax Error.

A syntax error might just be from copying and pasting into the VBE. Try
typing it straight, maybe?
I tried re-recording one
(by going to Edit:paste Special:paste as Unformatted Text) but it
doesn't work either. When I perform the action during recording, it
does a plain text paste. When I try to run the Macro, all the original
formatting is still there.

Bug. See my other post.
 
E

Elliott Roper

Daiya said:
<snip>
The macro recorder is broken in Word 2004 for things involving paste special
(and I believe was broken in earlier versions too, though not sure). An
alternate Paste Unformatted macro is linked below, if necessary.
Hmm. I recorded mine in October 2004. That would have been v.X
recording ok for me.

Oh, they are much neater than the recorded one. I'll have a play with
those two.
Thanks.
 
S

secretdubai

Daiya said:
The macro recorder is broken in Word 2004 for things involving paste special
(and I believe was broken in earlier versions too, though not sure). An
alternate Paste Unformatted macro is linked below, if necessary.

Paste Text Macros
http://word.mvps.org/Mac/PasteText.html

Oh thank you so much - that works perfectly!

Re your other post: the update did seem to break the Normal template,
because it had reverted to Times as the default font (I always set it
to Arial in the Normal template).

The weird thing is I thought I had recorded my previous macros in Word
2004, but perhaps I had actually recorded them in Office 2000, then
they got automatically imported when I installed Word 2004? A mystery,
but things work again beautifully now! Thanks a million.
 
P

Paul Berkowitz

Re your other post: the update did seem to break the Normal template,
because it had reverted to Times as the default font (I always set it
to Arial in the Normal template).

In Office X and earlier, the Normal template was stored in
/Applications/Microsoft Office X/Templates/. In Office 2004 it is saved in
~/Documents/Microsoft User Data/, where ~/ means your user folder (home).
This is a better location. If you did an Upgrade for Office 2004, where it
imported all your data from Office X (or 2001 or 98) on the same computer,
then it ought to have imported Normal from the old location to the new one.
But if you did a new installation of Office 2004, fresh, without importing,
then you would have got a new, fresh Normal without any or your macros or
customizations.

Now - a new Normal in Word 2004 will actually have Times New Roman as the
default font, whereas a new Normal back in Word X (and earlier) had Times as
default font. So I imagine that when you said it had reverted to Times you
actually mean Times New Roman? If it was plain Times, then it was your old
Normal imported from Word X but which suddenly lost its macros. That can
happen too (freakish though it may be). That's why it is a good idea to
store macros not in Normal but in a separate template that you store in
/Applications/Microsoft Office 2004/Office/Startup/Word/ (or better, moved
to the Microsoft User Data folder, which is safer, and then make an alias to
it back in the original location). If you do that, Word loads your macros
every time it launches, but it won't get corrupted or muddled as Normal
sometimes can.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top