Solved

MS Word 2010 reformat shapes with text. Need to change font and margins.

Posted on 2013-12-27
1
685 Views
Last Modified: 2013-12-31
I have several documents that have multiple "Call Out" Shapes with Text in each (Verdana) and default Margin settings.  What would be the relevent VBA code to go through and change each shape to:

Font = Calibri
Size = 11
No Margins
Size of Shape = 80%
0
Comment
Question by:Cook09
1 Comment
 
LVL 14

Accepted Solution

by:
DrTribos earned 500 total points
ID: 39743102
Here you go:
Sub ChangeCallOut()

Dim oShape As Shape

For Each oShape In ActiveDocument.Shapes
    If oShape.Type = msoCalloutOne Then
    
        With oShape
            'Font = Calibri
            .TextFrame.TextRange.Font.Name = "Calibri"
            'Size = 11
            .TextFrame.TextRange.Font.Size = 11
            'No Margins
            .TextFrame.MarginBottom = 0
            .TextFrame.MarginLeft = 0
            .TextFrame.MarginRight = 0
            .TextFrame.MarginTop = 0
            'Size of Shape = 80%
            .Height = oShape.Height * 0.8
            .Width = oShape.Width * 0.8
        End With
    End If
Next oShape
End Sub

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error 5180 Word Cannot open document template 1 29
Office 365 vs. In-House 4 80
Macro 6 49
Regarding Notepad++ 4 35
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now