Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-10-2022, 05:20 AM
lukkycs lukkycs is offline formatting text boxes Windows 10 formatting text boxes Office 2016
Novice
formatting text boxes
 
Join Date: May 2022
Posts: 2
lukkycs is on a distinguished road
Default formatting text boxes

Hello i need advice. I work with multiple files where there is a pile of text boxes.



In all I need to set up: scale: 100%; space: normal; position: normal.


Currently I have to click in each text box to select the text and set it, which is very time consuming for 200 text boxes.
Couldn't it be made easier by some macros?


Thanks for helping me.
Reply With Quote
  #2  
Old 05-10-2022, 08:28 AM
lukkycs lukkycs is offline formatting text boxes Windows 10 formatting text boxes Office 2016
Novice
formatting text boxes
 
Join Date: May 2022
Posts: 2
lukkycs is on a distinguished road
Default

solved, I used:
Code:
Sub SetTextBoxStyle()
  Dim oShape As Shape, objDoc As Document, oInnerShape As Shape
  Application.ScreenUpdating = False
  Set objDoc = ActiveDocument
  For Each oShape In objDoc.Shapes
    If oShape.Type = msoGroup Then
      For Each oInnerShape In oShape.GroupItems
        FormatAShape oInnerShape
      Next oInnerShape
    Else
      FormatAShape oShape
    End If
  Next oShape
  Application.ScreenUpdating = True
End Sub

Function FormatAShape(oShape As Shape)
  With oShape

    If .TextFrame.HasText Then
     
'      .TextFrame.TextRange.Font.TextColor.RGB = RGB(8, 8, 8)  ' Set text color.
      .TextFrame.TextRange.Font.Size = 9  ' Set text size.
      .TextFrame.TextRange.Font.Name = "Arial Narrow"  ' Set font face.
      .TextFrame.TextRange.Font.Spacing = 0  ' Set character spacing.
      .TextFrame.TextRange.Font.Scaling = 100 ' Set character spacing.
      .TextFrame.TextRange.Font.Position = 0  ' Set character spacing.
    End If
  End With
End Function

but i still need to set the bullets - scale: 100%; space: normal; position: normal. and somehow I can't.
I need in the document for all bullets and numbering rewrite the format
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting connectors and text boxes SargeUSMC Visio 1 08-30-2021 05:12 PM
Macro to Formatting Text Boxes effimera Word VBA 3 07-01-2021 03:10 AM
formatting text boxes formatting photos within text boxes ianmck Drawing and Graphics 5 06-28-2018 09:04 PM
formatting text boxes Drawing lines between text boxes which have actual text within the text boxes RHODIUM Word 6 10-01-2016 04:43 PM
formatting text boxes Is there a way to anchor drop-down content control boxes so entering text doesn't change formatting? TzarChasm Word 7 04-14-2016 06:28 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:08 AM.


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