Moving a macro from Newmacros to Macros

J

John Doue

I created the most simple macro:

Sub Altx()
'
' Altx Macro
' Macro recorded 11/15/2008 by JOHN
'
Selection.TypeText Text:="£"
End Sub

and assigned it to the Alt-X key combinaison. It works as expected.

Now, I tried moving this macro from Newmacros to Macros, and cannot get
to work again with the Alt-X key combination. Of course, it keeps
working normal from the Run Macro menu.

What am I doing wrong?

Thanks
 
L

Lene Fredborg

You need to reassign the shortcut. When you move or rename a macro, the
reference from the shortcut to the macro is lost. Imagine that the shortcut
points to a macro with a specific name and module name – in this case, you
changed the module name.

--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
J

John Doue

Lene said:
You need to reassign the shortcut. When you move or rename a macro, the
reference from the shortcut to the macro is lost. Imagine that the shortcut
points to a macro with a specific name and module name – in this case, you
changed the module name.
Thanks, but I did not forget to do that, to no avail!
 
J

John Doue

John said:
I created the most simple macro:

Sub Altx()
'
' Altx Macro
' Macro recorded 11/15/2008 by JOHN
'
Selection.TypeText Text:="£"
End Sub

and assigned it to the Alt-X key combinaison. It works as expected.

Now, I tried moving this macro from Newmacros to Macros, and cannot get
to work again with the Alt-X key combination. Of course, it keeps
working normal from the Run Macro menu.

What am I doing wrong?

Thanks

This is what I did that appears to have solved, one or the other, the
problem. I renamed the macro Pound, assigned it to Alt+X and it worked.
I renamed it back to Altx, reassigned it to Alt+X ... and bingo, it now
works.

Needless to say, I have no idea why, but I will survive ... One of those
Normal.dot misteries ...

Regards
 
L

Lene Fredborg

OK. I did not understand from you original post that you had already tried to
reassign the shortcut.

I have had the same problem at least once and I also experienced that
renaming the macro was the only thing that helped.

--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
J

John Doue

Lene said:
OK. I did not understand from you original post that you had already tried to
reassign the shortcut.

I have had the same problem at least once and I also experienced that
renaming the macro was the only thing that helped.

Cannot blame you, I did not say it, and I should have.

I am glad to know this bizarre incident was not unique. I guess this may
happen when normal.dot somehow gets mixed up. This work-around might
need to be posted somewhere where it could one day be useful to others
running into the same problem.

Regards
 
L

Lene Fredborg

When I had the problem, it was in an add-in (dot file in Word's Startup
folder) and not in Normal.dot and the problem did not occur after moving or
renaming a macro. It just was not possible to make the shortcut work until I
renamed the macro. We may never find the reason to the problem.

I have previously posted information about the renaming solution as an
answer to another user, see
http://groups.google.com/group/micr...users/browse_thread/thread/6b9856d0312ce18d?q

The problem is actually on my (very long) list of subjects to write about
when I find the time...

--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
J

John Doue

Lene said:
When I had the problem, it was in an add-in (dot file in Word's Startup
folder) and not in Normal.dot and the problem did not occur after moving or
renaming a macro. It just was not possible to make the shortcut work until I
renamed the macro. We may never find the reason to the problem.

I have previously posted information about the renaming solution as an
answer to another user, see:
http://groups.google.com/group/micr...users/browse_thread/thread/6b9856d0312ce18d?q

The problem is actually on my (very long) list of subjects to write about
when I find the time...
I guess this goes with the territory ...

Regards from Finland
 

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