Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 10-07-2022, 02:29 PM
macropod's Avatar
macropod macropod is offline VBA Module for inserting images into Photo Album Windows 10 VBA Module for inserting images into Photo Album Office 2016
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

Try adding:
Code:
Aspect as Boolean
to:
Code:
Dim i As Long, j As Long, c As Long, r As Long, NumCols As Long, iShp As InlineShape
inserting:
Code:
Aspect = RwHght > ColWdth
before:
Code:
On Error GoTo 0
and changing:
Code:
        With iShp
          .LockAspectRatio = True
          If (.Width < ColWdth) And (.Height < RwHght) Then
            .Width = ColWdth
            If .Height > RwHght Then .Height = RwHght
          End If
        End With
Code:
        With iShp
          .LockAspectRatio = True
          If (.Height > .Width) <> Aspect Then
            Set Shp = .ConvertToShape
            Shp.Rotation = 90
            Shp.ConvertToInlineShape
          End If
        End With
        Set iShp = oTbl.Cell(r, c).Range.InlineShapes(1)
        With iShp
          If (.Width < ColWdth) And (.Height < RwHght) Then
            .Width = ColWdth
            If .Height > RwHght Then .Height = RwHght
          End If
        End With
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
photo album



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot group picture after having used photo album mabi2911 PowerPoint 2 03-06-2017 11:50 PM
VBA Module for inserting images into Photo Album Photo Album to Include Videos Rob-161 PowerPoint 1 09-27-2016 11:27 AM
Photo album with each slide for 2.5 seconds (not 2 and not 3) GregVolk PowerPoint 3 05-31-2016 11:25 AM
VBA Module for inserting images into Photo Album power point 2011 is there anyway to create a photo albumn(s) and insert the album bet Jrmatm26538 PowerPoint 6 02-14-2012 09:00 AM
VBA Module for inserting images into Photo Album Help!!Need to apply same custom animation to all slides in a photo album. watsonstudios PowerPoint 3 05-27-2011 01:36 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:57 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