Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2020, 03:10 PM
thomasoj thomasoj is offline VBA - Word how to globally change the font and font size in footnotes Windows 10 VBA - Word how to globally change the font and font size in footnotes Office 2016
Novice
VBA - Word how to globally change the font and font size in footnotes
 
Join Date: Jan 2020
Posts: 3
thomasoj is on a distinguished road
Default VBA - Word how to globally change the font and font size in footnotes

Hello,
Thank you in advance for your assistance. I produce outgoing letters that obtain information from multiple resources. The resources are created by different individuals and they use different styles and formatting.


I was able to solve changing the body of the letter to a consistent font and font size. My problem is with the footnotes. I thought I would just have to change the range in my other macro to footnotes and I'd be set. Unfortunately, I was incorrect.
Here is what I have written. (I'm very new to VBA and programming)


Sub Zchangefootnote()
'
' Zchangefootnote Macro
'
Dim intResult As Integer
Dim strMessage As String
Dim myRange As Range
Set myRange = ActiveDocument.footnotes
myRange.WholeStory
myRange.Font.Name = "Times New Roman"
myRange.Font.Size = 10
Exit Sub
End Sub


The error occurs at Set myRange = Activedocument.footnotes.


Thank you for any assistance.




Tom
Reply With Quote
  #2  
Old 01-14-2020, 10:32 PM
gmayor's Avatar
gmayor gmayor is offline VBA - Word how to globally change the font and font size in footnotes Windows 10 VBA - Word how to globally change the font and font size in footnotes Office 2016
Expert
 
Join Date: Aug 2014
Posts: 3,067
gmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nice
Default

Instead of adding manual formatting, change the style
Code:
Sub Zchangefootnote()
    With ActiveDocument.Styles("Footnote Text").Font
        .Size = 10
        .Name = "Times New Roman"
    End With
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 01-15-2020, 02:37 AM
macropod's Avatar
macropod macropod is offline VBA - Word how to globally change the font and font size in footnotes Windows 7 64bit VBA - Word how to globally change the font and font size in footnotes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,779
macropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud ofmacropod has much to be proud of
Default

This thread is a duplicate of: https://www.msofficeforums.com/word-...-footnote.html
Kindly don't start multiple threads on the same topic.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #4  
Old 01-15-2020, 06:26 AM
thomasoj thomasoj is offline VBA - Word how to globally change the font and font size in footnotes Windows 10 VBA - Word how to globally change the font and font size in footnotes Office 2016
Novice
VBA - Word how to globally change the font and font size in footnotes
 
Join Date: Jan 2020
Posts: 3
thomasoj is on a distinguished road
Default Thankyou

Thank you !!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA - change font and font size for Word footnote thomasoj Word VBA 1 01-15-2020 02:37 AM
VBA - Word how to globally change the font and font size in footnotes Merging two Word documents: 2nd document not maintaining original font type and font size Swarup Word 31 08-28-2018 06:55 PM
Opening doc in Word 2010 causes normal template to change - font size incorrect Simonb Word 4 01-26-2016 03:52 PM
VBA - Word how to globally change the font and font size in footnotes Looping Macro to Change Font, Font Size, and Give Heading 1 WH7262 Word VBA 1 08-26-2014 03:46 PM
Word will not hold settings, such as font and size of font Mary M Word 1 10-12-2013 07:41 AM


All times are GMT -7. The time now is 02:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft