?
Solved

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

Posted on 2013-12-27
1
Medium Priority
?
701 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
DrTribos earned 2000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
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…

650 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