Share via

Create macro in word

Anonymous
2025-01-24T08:51:39+00:00

I have been asked to run a macro with the statement ActiveDocument.ConvertNumbersToText. I have zero experience in adding a macro and all on-line help assume that you have experience.

Can you advise how I can add the macro then run it

Microsoft 365 and Office | Word | For business | 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

Answer accepted by question author

  1. Paul Edstein 82,861 Reputation points Volunteer Moderator
    2025-01-24T10:45:00+00:00

    Such a macro would be:

    Sub FixNumbers() 
    
    ActiveDocument.ConvertNumbersToText 
    
    End Sub
    

    For PC macro installation & usage instructions, see: http://www.gmayor.com/installing\_macro.htm

    For Mac macro installation & usage instructions, see: https://wordmvp.com/Mac/InstallMacro.html

    2 people found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Suzanne S Barnhill 277.2K Reputation points MVP Volunteer Moderator
    2025-01-24T12:57:54+00:00

    Paul has given you the way to create a permanent macro, but if you just want to run that macro once, here's how:

    1. In Word, press Alt+F11; the Visual Basic Editor opens.
    2. Press Ctrl+G to activate the Immediate window.
    3. In that window, type (or paste) ActiveDocument.ConvertNumbersToText

    and press Enter.

    2 people found this answer helpful.
    0 comments No comments
  2. Charles Kenyon 166.7K Reputation points Volunteer Moderator
    2025-01-24T13:43:03+00:00

    I suspect I was the person who suggested that statement in a macro, yesterday.

    Since you were posting in the programming site Stack Overflow, I assumed that you knew how to make macros.

    Assumptions can get you! :(

    Anyway, macropod has provided a macro container for the statement.

    Here are resources on how to create macros and use code like that you find on the Internet:

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2025-01-24T13:56:22+00:00

    Thank you Charles. I was able to take your reply and with the help of the response from replies from macropod and Suzanne I have managed to get the result needed

    0 comments No comments
  4. Anonymous
    2025-01-24T13:07:27+00:00

    Thanks Suzanne, that is very helpful

    0 comments No comments