Solved

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

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
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 video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

810 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