![]() Selection. Selection.MoveDown Unit:=wdLine, Count:=1 Selection.MoveRight Unit:=wdCharacter, Count:=1 ' Macro recorded þ16þ/08þ/2010 by Majid FouladpourĪ Range:=Selection.Range, NumRows:=4, NumColumns:= _Ĥ, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _ Here is the code generated by the recorder for my small test: Sub MakeTable() I just tested the second approach and it works just fine. When you have shaped and formatted the table end recording and you have captured all the required steps to place the exact same table wherever you want. Press Ctrl+V to paste the copied table which will replace yourĪnother approach is to start macro recording and then create the table from scratch, that way you will not need a pre-existing table for the macro to work.When you have your placeholder text found and selected, press Esc.Type the placeholder text into Find what box ( _table_goes_here_). ![]() Press Ctrl + F to bring up the Find dialog.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. Hold down Shift and press down arrow key enough times until the 6 contributors Feedback In this article Remarks 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.Press Ctrl + Home to go to the beginning of the document (just.Then turn recording on and complete the following steps: To get it work, the table should exist before you run the macro.īefore you start recording the following conditions should be met: But note that macro recorder does not save the contents of the clipboard, so the markup that creates the table will not be saved with the macro. Invoke the recorder, then complete the steps to copy and paste the table, then you can edit it to see the macro's actual instructions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |