'See if User wants to add border If MyAnswer = vbYes Then 'Border ThicknessĮnd Sub Using VBA Code Found On The Internet MyAnswer = MsgBox("Do you wish to add a border to the selected image?", vbYesNo, "Add Border") 'Ask and receive verification from user via Messagebox 'Select Image so user can see what image we are talking about 'PURPOSE: Loop through all images in ActiveDocument and ask if border should be added 'SOURCE: Dim myPic As InlineShapeĭim MyAnswer As Integer 'Loop Through All Pictures (aka Inline Shapes) in Document For Each myPic In ActiveDocument.InlineShapes Let’s modify the above code a little bit and allow the user to cycle through each of the pictures in the Word document and decide whether the picture should have a border. 'Loop Through All Pictures (aka Inline Shapes) in Document For Each myPic In ActiveDocument.InlineShapes 'PURPOSE: Add borders around all images in the document 'SOURCE: Dim myPic As InlineShape This VBA code will apply a custom border to all the pictures in your Word Document.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |