Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2018, 09:48 AM
NOVUS2018 NOVUS2018 is offline Editing Multiple Images with the Same Settings Windows 7 64bit Editing Multiple Images with the Same Settings Office 2016
Novice
Editing Multiple Images with the Same Settings
 
Join Date: Jan 2018
Posts: 3
NOVUS2018 is on a distinguished road
Default Editing Multiple Images with the Same Settings

Hello!

I have 96 word documents, each document having between 10 and 40 images, and I need to brighten all of the images by about 25%. Is there a way to do this for each document instead of brightening each image individually?
Reply With Quote
  #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: 21,962
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
  #3  
Old 01-30-2018, 06:19 AM
NOVUS2018 NOVUS2018 is offline Editing Multiple Images with the Same Settings Windows 7 64bit Editing Multiple Images with the Same Settings Office 2016
Novice
Editing Multiple Images with the Same Settings
 
Join Date: Jan 2018
Posts: 3
NOVUS2018 is on a distinguished road
Default

Thank you! Is there a similar macro that could be used to change them all to Word's "Grayscale" setting?
Reply With Quote
  #4  
Old 01-30-2018, 12:43 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: 21,962
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

Simply change the two instances of:
.PictureFormat.Brightness = .PictureFormat.Brightness * 1.25
to:
.PictureFormat.ColorType = msoPictureGrayscale
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 01-30-2018, 01:33 PM
NOVUS2018 NOVUS2018 is offline Editing Multiple Images with the Same Settings Windows 7 64bit Editing Multiple Images with the Same Settings Office 2016
Novice
Editing Multiple Images with the Same Settings
 
Join Date: Jan 2018
Posts: 3
NOVUS2018 is on a distinguished road
Default

You're a macro god. Thank you for saving me roughly 15 hours of work.
Reply With Quote
Reply



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 02:33 PM.


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