The second way is to use VBA, or Visual Basic for Applications. Further, Word macros can be edited by using the VBE,. There are over 950, most of which are on menus and toolbars and have shortcut keys assigned to them. Some of these commands, however, are not assigned to menus or toolbars by default. Before you create your own Word macro, you should check to see if it already exists and can be assigned to a toolbar. To see the commands available in Word, follow these steps:. On the Tools menu, click Macro.
Click Macros from the submenu; you can also use the Alt + F8 shortcut key to access the Macros dialog box. In the dropdown menu beside the Macros in label, select Word Commands.
An alphabetical list of the command names will appear. If you highlight a name, a description of the command will appear at the bottom of the box under the Description label. If the command you wish to create already exists, you should not duplicate it with your own Word macro. Otherwise, you may end up spending time creating an ineffective macro that you won’t use.
![Create A Macro In Word For Mac 2016 Create A Macro In Word For Mac 2016](/uploads/1/2/5/4/125488610/789643349.png)
Once you have these things in mind, it is time to plan the actual steps. This is important because the recorder will remember everything you do and include it in the macro.
For example, if you type something and then delete it, every time you run that macro, Word will make the same entry and then delete it, making a sloppy and inefficient macro. When you are planning your macros, here are some things to consider:. Plan the commands and the order in which you want the macro to perform them. Know the shortcut keys for the commands you plan to use. This is particularly important for navigation; you will not be able to use the mouse for navigation within the document area when you are running the recorder. Further, you will create a leaner macro if you use a shortcut key rather than the arrow keys. Plan for messages that Word might display and that will stop the macro.
Use as few steps as possible to keep the macro efficient. Do at least one test run before you start recording. After you’ve planned your Word macro and done a run through, you are ready to record it.
If you’ve planned your macro carefully enough, recording it for later use will be the easiest part of the process. It is so easy, in fact, that the only difference between creating a macro and working on the document is that you have to press a few extra buttons and make a couple of selections in dialog boxes.
A form in Word 2016 is a means of soliciting and recording information. You can use forms like the one shown to enter data faster and to reduce data-entry errors. You can use forms like the one shown to enter data faster and to reduce data-entry errors.
Setting Up Your Macro Recording First, click Tools in the menu and then click Record New Macro. to open the Record macro dialog box. In the box beneath 'Macro name,' type a unique name. Names can contain up to 80 letters or numbers (no symbols or spaces) and must begin with a letter. It is advisable to enter a description of the actions the macro performs in the Description box.
![2016 2016](/uploads/1/2/5/4/125488610/232444889.jpg)
The name you assign the macro should be unique enough that you remember what it does without having to refer to the description. Once you have named your macro and entered a description, select whether you want the macro to be available in all documents or only in the current document. By default, Word makes the macro available to all your documents, and you will probably find that this makes the most sense. If you choose to limit the availability of the command, however, simply highlight the document name in the Store Macro in drop-down box. When you have entered the information for the macro, click OK. The Record Macro Toolbar will appear in the upper left corner of the screen.
Record your macro The mouse pointer will now have a small icon that looks like a cassette tape beside it, indicating that Word is recording your actions. You can now follow the steps you laid out in the planning stage; once you are done, press the Stop button (it is the blue square on the left). Once you press the Stop button, your Word macro is ready to use. If, for any reason, you need to pause the recording, click the Pause Recording/Resume Recorder button (it is the one on the right).
To resume recording, click it again. Test Your Macro To run your macro, use the Alt + F8 shortcut key to bring up the Macros dialog box. Highlight your macro in the list and then click Run. If you don’t see your macro, make sure the correct location is in the Macros in box. The purpose behind creating macros in Word is to speed up your work by putting repetitive tasks and complex sequences of commands at your fingertips.
What could take literally hours to do manually only takes a few seconds with the click of a button. Of course, if you’ve created a lot of macros, searching through the Macros dialog box will eat up a lot of the time you save.
If you assign your macros a shortcut key, however, you can bypass the dialog box and access your macro directly from the keyboard in the same way you can use shortcut keys to access other commands in Word. Creating Keyboard Shortcuts for Macros. From the Tools menu, select Customize. In the Customize dialog box, click Keyboard.
The Customize Keyboard dialog box will open. In the Categories scroll box, select Macros. In the Macros scroll box, find the name of the macro to which you would like to assign the shortcut key.
If the macro currently has a keystroke assigned to it, the keystroke will appear in the box below the Current keys label. If no shortcut key has been assigned to the macro, or if you would like to create a second shortcut key for your macro, click in the box below the label Press new shortcut key. Enter the keystroke you would like to use to access your macro. If the shortcut key is already assigned to a command, a message will appear that says Currently assigned to followed by the name of the command. You can reassign the keystroke by continuing, or you can select a new keystroke.
In the Save changes in dropdown box select Normal to apply the change to all documents created in Word. To use the shortcut key only in the current document, select the document name from the list. Click Assign. Click Close. Click Close on the Customize dialog box.
Hi Banjo060664, As your friend has Office 365 and therefore 5 licenses available, any chance you can install Office 365 on your mac and registrer with his account? This would pin down the problem to your version of Office. After you're finished with the testing your friend can go to the Office 365 control panel and remove the license from your device. Regards Simon If you find that my post has answered your question, please mark it as the answer.
If you find my post to be helpful in anyway, please click vote as helpful. Regards Simon Disclaimer: This posting is provided AS IS with no warranties or guarantees, and confers no rights.
I subscribe to trial Office 365. All that actually does is put Office 2016 for Mac back on my laptop. So I have uninstalled Office, and then reinstalled it. I create a basic.xlsm spreadsheet. use VBA to include this macro Sub SaveAndClose ActiveWorkbook.Close SaveChanges:=True End Sub If I simply Run the macro.
If put a Button (Form Control) on the sheet, and assign the macro to it. Then when I click the button, Excel crashes, with the same error report as previously listed. Just cant get any help direct from Microsoft. Hi Banjo, You could also try to downgrade Excel to a previous version by following this: Please refer to this:.
Go into one of the office Apps and choose Help Check for Updates at the top of the screen. Turn off automatic updates.
Find the previous version of the particular application you want to revert (Word, Outlook, Powerpoint, Excel) on the Office Update History for 2016 page:. You can download the installer package for the individual app and not the whole Office 365 update by clicking the links on the right hand side (Word, Excel, etc). Before opening the update pkg, delete the application (Word, Excel, etc) from your Applications folder in the Finder. It will go to the trash (in case you need to restore it). Open the installer package and it will re-install the previous version for you.
You may need to open it and force quit 1-2 times before it will function correctly again for some reason. Wait until a later date and try updating again when hopefully the bugs have been worked out:), and if you have time, post on here about your problem, so that they can work on a fix to it. Regards Simon If you find that my post has answered your question, please mark it as the answer.
If you find my post to be helpful in anyway, please click vote as helpful. Regards Simon Disclaimer: This posting is provided AS IS with no warranties or guarantees, and confers no rights. Simon, thanks for your advice. As an update: I have created a basic.xlsm file with a simple macro in it.
Sub SaveAndClose ActiveWorkbook.Close SaveChanges:=True End Sub I have inserted a button on Sheet1 and assigned this macro to it. I have emailed this file to 4 different colleagues. Using Office 2011 for Mac - no problems 2.
Using Office 2016 for Mac - version 16.9 (apparently no problem) 3. Using Office 2016 for Mac - Version 15.22 (165006) excel crashed on pressing button 4. Using office 2016 for Mac - Version 15.40 (171108) -no apparent problem This seems inconclusive to me Of note, I also created the same simple Excel.xlsm file on my wife's Office 2011 for Mac laptop, and emailed it to my laptop.
It still crashed on pressing the Form Control Button. If I make a change to the macro to get it to simply save the spreadsheet. No crash, so it seems that it is the use of a Form Control button to run a macro that closes a spreadsheet that causes the issue. Remember, from my original post: My 'Save and Close' Macro works OK if I simply run the macro, and it also works if I use a WorksheetSelectionChange(ByVal Target As Excel.Range) BUT if I insert a Button (Form Control Button from Developer Toolbar) it crashes on use I will try to roll back my Excel and see what happens, and while it may resolve my problem immediately, one of my spreadsheets is used by a lot of work colleagues, who may well also have similar hardware and software to me, namely. Another update: So I have rolled my excel back to Version 15.36 (170702) and guess what.
Pressing the form control button to run the save and close macro does NOT crash Excel. I have rolled forwards to Version 15.41 (171205) and still no crash issues.
If I roll forwards to Version 16.9 (18011602) and Excel crashes when I press the Form Control Button. In my opinion then, a bug has been induced in the update from version 15.41 to version 16.9 Hopefully Microsoft will bug fix this quickly.
I would be interested to know if others who have used Buttons to run a close macro have also experienced crash of Excel?