Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-29-2018, 05:48 PM
macropod's Avatar
macropod macropod is offline Editing Multiple Images with the Same Settings Windows 7 64bit Editing Multiple Images with the Same Settings Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

To brighten every image in every document in a folder by 25%, you could use a macro like:
Code:
Sub UpdateDocuments()
Application.ScreenUpdating = False
Dim strFolder As String, strFile As String, strDocNm As String, wdDoc As Document, Shp As Shape, iShp As InlineShape
strDocNm = ActiveDocument.FullName
strFolder = GetFolder
If strFolder = "" Then Exit Sub
strFile = Dir(strFolder & "\*.doc", vbNormal)
While strFile <> ""
  If strFolder & "\" & strFile <> strDocNm Then
    Set wdDoc = Documents.Open(FileName:=strFolder & "\" & strFile, AddToRecentFiles:=False, Visible:=False)
    With wdDoc
      For Each Shp In .Shapes
        With Shp
          Select Case .Type
            Case msoPicture, msoLinkedPicture: .PictureFormat.Brightness = .PictureFormat.Brightness * 1.25
          End Select
        End With
      Next
      For Each iShp In .InlineShapes
        With iShp
          Select Case .Type
            Case wdInlineShapePicture, wdInlineShapeLinkedPicture: .PictureFormat.Brightness = .PictureFormat.Brightness * 1.25
          End Select
        End With
      Next
      .Close SaveChanges:=True
    End With
  End If
  strFile = Dir()
Wend
Set wdDoc = Nothing
Application.ScreenUpdating = True
End Sub

Function GetFolder() As String
Dim oFolder As Object
GetFolder = ""
Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0)
If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path
Set oFolder = Nothing
End Function
For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfer images from Visio to Word without losing the settings angelspund88 Visio 2 05-29-2016 04:34 PM
Editing Multiple Images with the Same Settings Editing restriction for text fields and images expert4knowledge Word 5 08-21-2012 04:00 AM
Editing Multiple Images with the Same Settings Editing multiple labels nels04 Word 2 12-06-2011 03:48 AM
Editing Multiple Images with the Same Settings editing of images, tables and caption in the whole document. Jamal NUMAN Word 4 07-08-2011 04:14 AM
Editing Multiple Images with the Same Settings Editing multiple docs frankdh Word 2 11-02-2010 10:59 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:28 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft