Now you can run this macro any number of times to batch resize all the images in an MS Word document. To use this Macro later again, you can save your document as Word Macro-Enabled document. As I said earlier that name of our macro is Resize, so we will run that macro.Īt this point, all the images in Word doc have been resized to height and width that were specified in the macro Now click on Macros button in Developer menu to view the list of macros to run.Click on View Microsoft Button to view your Microsoft Word document file.Method 2: Follow these steps to run your Macro code to batch resize images. Method 1: You can run it by clicking Run Sub/User Form button. ![]() Now you can run your macro code by 2 methods. In this code, resize() is the name of macro. You can specify required height by this option .ScaleHeight = Required height (in pixels) and width by this option .ScaleWidth = Required Width (in pixels). Now in this code, you can specify required height and width to resize your images (the code above has set Height as 300, and Width as 500). Now, double click on ThisDocument under Project (temp) > Microsoft Word Objects > ThisDocument to display code editor window.Ĭopy and paste the following code in this window: Select Visual Basic in Developer menu to pop up Microsoft Visual Basic window. ![]() Now follow these steps to setup your macro code: Step 3: Macro Code to Batch Resize Images in Word Doc: Now, you have completed all the prerequisites to batch resize all your images in a Word document. Restart MS Word to reflect changes that you have made. This will enable your Developer tab in Word menu ribbon on the top. ![]() You can easily enable it by these steps:Ĭlick on Office icon at top left and select Word option. Now switch to Display tab and select Show Developer tab in the Ribbon. Step 2: Turn on Developers Menu in MS Word:Īfter enabling macros, now you need to turn on your Developers menu. Switch to Macro Settings tab and select Enable all macros. Also turn on Trust access to the VBA project and object model option. Now switch to Trust Center tab and click on Trust Center Settings.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |