Solved

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

Posted on 2013-12-27
1
688 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 15

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
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 …
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

809 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