Share via

Macro recording doesn't record any commands

Anonymous
2011-07-04T00:31:26+00:00

Hi all.  This seems like it must be operator error, but I don't know what's wrong.  I keep trying to record Macros in Word 2010 and when I'm done, no commands appear in the macro I just recorded.  I thought it was because I was using the mouse to click on commands, so I used keyboard shortcuts instead.  Still no luck.  Thought it might have something to do with macro security, so I set up a trusted location and stored the document that I was trying to record the macro for in the trusted location.  Still no luck.  Can someone help?  Thanks.

Jaime

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

10 answers

Sort by: Most helpful
  1. Anonymous
    2011-09-19T21:50:36+00:00

    Thanks for trying to help. I will try to be more specific with what I am trying to do.

    I would like create a macro that will format a cross-reference field. Here is my typical usage.

    I insert captions to figures and tables using the Insert Caption command (a button on the References ribbon). Here is an example of one of my captions:

    Figure 17.  Water-level response in observation wells.

    Then, I use the Cross-reference button (also on the References ribbon) to insert a cross reference to that figure caption into my text. For example,

    Well 5 showed a trend of gradually recovering water levels (see figure 17).

    In the above sentence the "figure 17" part is the cross reference and Word calls it a 'field'.  This is wonderful because if I insert or remove a figure before #17, I can simply automatically update 'fields' in the document (press F9) and the correct numbers appear in both the caption and the cross reference. That all works fine.  The problem is that when I insert a cross reference, the text shows up as "Figure 17" with a capital F. I need it to be lower case f.  To get it to be lower case, I do the following steps:

    (1) right click on the cross reference field (the "Figure 17" in the text part of the document,

    (2) chose 'Edit Field...' from the right click menu, then a window pops up

    (3) click the 'Preserve formatting during updates' checkbox and

    (4) click on 'Lowercase' in the 'Format:' dropdown box.

    This changes the cross reference to lower case f but the caption still has the capital letter F.  I want a macro activated by a keystroke that will do those last four steps.

    Was this answer helpful?

    0 comments No comments
  2. Charles Kenyon 167.4K Reputation points Volunteer Moderator
    2011-09-17T22:50:57+00:00

    Format: Lowercase.

    Any suggestions?

    The selection code for this is:

        Selection.Range.Case = wdLowerCase

    The selection range isn't the best to use for this because you can end up with your insertion point jumping all around but it gives a starting place.

    Edit Field isn't a Word command. What kind of field?

    Three people had this question, but I don't see three people responding with information. This is highly fact and context specific. If you want answers you have to provide information.

    Was this answer helpful?

    0 comments No comments
  3. Charles Kenyon 167.4K Reputation points Volunteer Moderator
    2011-09-17T02:44:19+00:00

    Many commands cannot be recorded.

    Someone who knows vba better than I do is likely to provide you wih some help.

    As Pam said earlier, though, tell us both what steps you were trying to record as well as what you were trying to accomplish with these steps. (There are often multiple ways to do something in Word.)

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-09-16T22:44:56+00:00

    I am having the same problem.  The macro I want to record would use the following commands:

    Edit field

    Preserve formatting during updates

    Format: Lowercase.

    To do these steps without a macro, I right click on text that is a field (in my case, a cross reference to a caption). A window pops up and I click the 'Preserve formating during updates' checkbox and click on 'lowercase' in the 'Format:' dropdown box. I tried adding the 'Edit field...' command to my ribbon thinking the right click was the issue, but that still didn't work.  I go to Visual Basic editor and no commands are recorded.  I have set my trusted security to allow all macros and I have saved as a macro enabled document, but I think the problem is that the commands I click on are not being recorded.

    Any suggestions?

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2011-07-04T01:12:51+00:00

    Apparently, some commands can't be recorded.  Please explain what you are trying to do and what keystrokes etc. you are trying to record.  

    Pam

    Was this answer helpful?

    0 comments No comments