I don't have much background in programming or VBA but I've had some success so far, just can't figure out how to do exactly what I want. We create 2 slides for each sample we make. Each slide has data and images that are copied and pasted from other files. We have sets of pictures we copy and paste, one has 6 images, so I want to be able to resize, reposition and send them to back. I've figured out how to do it on individual images. Click one then run a macro, click the next run the next macro. Etc. I want to be able to run them all at once and haven't been able to figure it out. Any help would be greatly appreciated! Here's what I've been using.
'this macro is used to resize, reposition and send to back DLS CF (correlation function) graphs for developability slide decks
Sub DLS_CF()
With ActiveWindow.Selection.ShapeRange
'whatever window is actively selected will turn lock aspect ratio to on before resizing and positioning
.LockAspectRatio = msoTrue
'DLS CF Graph is 2.49"Hx3.33"W, lock aspect ratio on, Horizontal position 6.66" from top left corner and Vertical position 0" from top left corner. Value converted from inches to points
.Height = 179.28
.Left = 479.52
.Top = 0
End With
'sends selected window to back
ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
End Sub
'this macro is used to resize, reposition and send to back DLS MD (mass distribution) graphs for developability slide decks
Sub DLS_MD()
With ActiveWindow.Selection.ShapeRange
'whatever window is actively selected will turn lock aspect ratio to on before resizing and positioning
.LockAspectRatio = msoTrue
'DLS MD Graph is 2.49"Hx3.33"W, lock aspect ratio on, Horizontal position 6.66" from top left corner and Vertical position 2.51” from top left corner. Value converted from inches to points
.Height = 179.28
.Left = 479.52
.Top = 180.72
End With
'sends selected window to back
ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
End Sub
'this macro is used to resize, reposition and send to back DLS ID (Intensity distribution) graphs for developability slide decks
Sub DLS_ID()
With ActiveWindow.Selection.ShapeRange
'whatever window is actively selected will turn lock aspect ratio to on before resizing and positioning
.LockAspectRatio = msoTrue
'DLS ID Graph is 2.49"Hx3.33"W, lock aspect ratio on, Horizontal position 6.66" from top left corner and Vertical position 5.01” from top left corner. Value converted from inches to points
.Height = 179.28
.Left = 479.52
.Top = 360.72
End With
'sends selected window to back
ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
End Sub
'this macro is used to resize, reposition and send to back Tm (melting temp) graphs for developability slide decks
Sub Tm()
With ActiveWindow.Selection.ShapeRange
'whatever window is actively selected will turn lock aspect ratio to on before resizing and positioning
.LockAspectRatio = msoTrue
'Tm Graph is 2.49"Hx3.33"W, lock aspect ratio on, Horizontal position 10” from top left corner and Vertical position 0” from top left corner. Value converted from inches to points
.Height = 179.28
.Left = 720
.Top = 0
End With
'sends selected window to back
ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
End Sub
'this macro is used to resize, reposition and send to back Tagg 266 (aggregation temp @ 266 nm ) graphs for developability slide decks
Sub Tagg_266()
With ActiveWindow.Selection.ShapeRange
'whatever window is actively selected will turn lock aspect ratio to on before resizing and positioning
.LockAspectRatio = msoTrue
'Tagg 266 Graph is 2.49"Hx3.33"W, lock aspect ratio on, Horizontal position 10” from top left corner and Vertical position 2.51” from top left corner. Value converted from inches to points
.Height = 179.28
.Left = 720
.Top = 180.72
End With
'sends selected window to back
ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
End Sub
'this macro is used to resize, reposition and send to back Tagg 473 (aggregation temp @ 473 nm ) graphs for developability slide decks
Sub Tagg_473()
With ActiveWindow.Selection.ShapeRange
'whatever window is actively selected will turn lock aspect ratio to on before resizing and positioning
.LockAspectRatio = msoTrue
'Tagg 473 Graph is 2.49"Hx3.33"W, lock aspect ratio on, Horizontal position 10” from top left corner and Vertical position 5.01” from top left corner. Value converted from inches to points
.Height = 179.28
.Left = 720
.Top = 360.72
End With
'sends selected window to back
ActiveWindow.Selection.ShapeRange.ZOrder msoSendToBack
End Sub