Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-08-2018, 09:34 PM
macropod's Avatar
macropod macropod is online now need help creating a Word macro selecting all and changing font, size, and color thanks Windows 7 64bit need help creating a Word macro selecting all and changing font, size, and color thanks Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You should not be modifying a document that way. rather, you should create a Style with the desired characteristics (or modify an existing one) and apply that. For example, the following macro does what you ask by modifying & applying Word's 'Normal' Style:
Code:
Sub FormatActiveDocument()
Application.ScreenUpdating = False
With ActiveDocument
  With .Styles(wdStyleNormal).Font
    .Name = "Arial"
    .Size = 14
    .ColorIndex = wdDarkBlue
  End With
  With .Range
    .Style = wdStyleNormal
    .ParagraphFormat.Reset
    .Font.Reset
  End With
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
font, font color, macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
When changing table style in Word 2010, font size seems to change but doesn't show in new tables heartsoulliving Word 1 12-07-2016 05:17 PM
Word macro doesn't change font color Spideriffic Word VBA 8 11-04-2015 03:47 AM
need help creating a Word macro selecting all and changing font, size, and color thanks Changing the commentary font size in WORD 2013 to a larger one MikeD Word 3 06-01-2014 03:40 AM
need help creating a Word macro selecting all and changing font, size, and color thanks MAcro to List all the Font & its size in a word document shaukat74 Word VBA 1 01-29-2013 09:34 PM
changing font size without changing leading carolns Word 1 09-14-2009 12:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:26 PM.


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