Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 01-22-2015, 12:54 AM
gmayor's Avatar
gmayor gmayor is offline Updating/Format Objects Windows 7 64bit Updating/Format Objects Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You should be able to do that e.g. by using a sub which you can call for each chart to set the relative size to what is required.

Code:
Sub Macro1()
ScaleLinkedChart "Chart 4", 75
End Sub

Sub ScaleLinkedChart(strChart As String, lng_Size As Long)
'strChart is the chart name e.g. 'Chart 4'
'lng_size is the percentage of the original size e.g. 75 = 75%
Dim ofld As Field
Dim oShape As InlineShape
    For Each ofld In ActiveDocument.Fields
        If ofld.Type = wdFieldLink Then
            If InStr(1, ofld.Code, strChart) > 0 Then
                Set oShape = ofld.InlineShape
                oShape.ScaleHeight = lng_Size
                oShape.ScaleWidth = lng_Size
                Exit For
            End If
        End If
    Next ofld
lbl_Exit:
    Set ofld = Nothing
    Set oShape = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating/Format Objects Can't add ActiveX Objects. MSOfficeGuy PowerPoint 5 12-14-2014 07:37 AM
Updating/Format Objects Format Painter doesn't work on Table Format? Joey Cheung Word Tables 1 08-20-2014 02:24 AM
Updating/Format Objects Convert equation objects to inline objects sumjoh Word VBA 1 01-29-2013 08:38 PM
Updating/Format Objects Shape Objects Space Cowboy PowerPoint 4 10-04-2010 07:14 PM
Updating excel link alters table format in PP dbmagnus PowerPoint 0 06-03-2010 12:12 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:19 PM.


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