Editing macro does not work

K

korndorb

I made a change to a macro I wrote (recorded) years ago, but the
change I've made is ignored. I'm using Word 2007, Vista, 64 bit
machine. I run the macro by clicking on a custom icon. A macro runs -
and it does everything the original macro does except it does not
reflect the change. My macro name is (was?) "mpdater" and that is the
one I'm editing. It seems to me that my icon is executing some other
macro, but I do not know how to tell which macro name the icon is
actually now being associated with. I've looked at the list of macro's
in my normal.dotm. It is a long list since I'm using MathType, but I
see no other macro that looks like a likely candidate. I tried
renaming normal.dotm, creating a new normal.dotm, then bringing back
the original normal.dotm (with the macros). This did not solve the
problem.

The change I'm making is

FROM:

Selection.TypeText Text:="The desk HAS been clear for " & _
DateDiff("d", "8/20/2009", Now) & " days, and I
have exercised for " & _
DateDiff("d", "6/03/2009", Now) & " days except
for 1 day."
End Sub

TO:

Selection.TypeText Text:="The desk has been clear for " & _
DateDiff("d", "8/20/2009", Now) & " days, and I
have exercised for " & _
DateDiff("d", "6/03/2009", Now) & " days except
for 1 day."
End Sub

That is, "HAS" is changed to "has", a minor change. But when I execute
the macro, it continues to type out "...desk HAS been clear...".

I could probably resolve it by cutting and pasting the desired changed
macro to a new macro, create a new name, and customize an icon for
showing on the toolbar. But I would like very much to learn why I'm
unable to edit my existing macro, which probably means learning how to
tell WHICH macro is being run from a toolbar icon.

I would appreciate any suggestions.
 
D

Doug Robbins - Word MVP

See response to your other post in the vba.general newsgroup.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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