![]() ![]() 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. Indicators Agriculture & Rural Development Aid Effectiveness Climate Change Economy & Growth Education Energy & Mining Environment External Debt. The following code example indents the selected paragraphs by one-half inch. ![]() In the dialog box I enter a name, assign the macro to a button and click OK. ![]() In the Developer section of the ribbon menu I select 'Record Macro'. Recorded macros use the Selection object. When I attempt to record a macro to edit a picture in Word 2010 I do the following I select a picture so that it has the edit handles around it. 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. On the Home menu, click the Increase Indent button. 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. |