Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback. For more information, see Revising Recorded Visual Basic Macros. You can, however, modify the recorded macro to work with Range objects. #Record a macro in word for mac 2011 codeThe following code example indents the selected paragraphs by one-half inch. Recorded macros use the Selection object. LeftIndent and press F1 or click the Help button. View the Visual Basic code to determine the property that corresponds to the left paragraph indent (the LeftIndent property). Select the macro name that you assigned in Step 2 and click Edit. On the Developer ribbon, click Stop Recording. It must not have any spaces and should not contain special. When enabled, the Word macro virus protection tool will display a warning message when you attempt to open a file with embedded macros. The following dialog box will appear: In the Macro name box, enter the name you would like to use for your macro. For more information about the Trust Center and macro security in Office 2007, see Enable or disable macros in Office documents from Microsoft Office Online. From the menu, choose Tools Macro Record New Macro. On the Home menu, click the Increase Indent button. If you would like the macro to be available only in a specific file, open that file first. On the Developer ribbon, click Record Macro.Ĭhange the default macro name to a name of your choice and click OK to start the recorder. For example, if you don't know what property or method to use to indent a paragraph, do the following: After you record your actions, you can modify the code to do exactly what you want. The macro recorder translates your actions into Visual Basic code. If you are unsure of which Visual Basic method or property to use, you can turn on the macro recorder and manually perform the action.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |