![]() |
|
#1
|
|||
|
|||
![]()
Hello,
I´m looking for a macro that keeps the same size of the fonts when I change the formats of bidirectional languages. However, I don´t know how to keep the same font size whatever the font size is in the document. In other words, if the font size is 7 in the latin text, I want 7 in the bidirectional document too. If it is 8, I want it 8 too. So, instead of giving a value to all fonts individually in the document (7, 8, ...), I want range or global value to keep the same font size. At the moment, I have created this macro. As you can see, I have duplicated the code to keep the font size to 7 and another one to keep the font size 8. However, I´m looking for a global value or a range to apply to Font.Size = "" that keeps the same font size, without the need of inserting 7, 8, etc.. Does anyone know if this is possible? Sub ReplaceFontForOneDocument() Dim objSingleWord As Range Dim objDoc As Document Set objDoc = ActiveDocument With objDoc For Each objSingleWord In .Words If objSingleWord.Font.Size = "7" Then objSingleWord.Font.SizeBi = "7" End If Next End With With objDoc For Each objSingleWord In .Words If objSingleWord.Font.Size = "8" Then objSingleWord.Font.SizeBi = "8" End If Next End With |
#2
|
||||
|
||||
![]()
Doing this for every word is ultra-slow but the basic principle would be
Code:
Sub ReplaceFontForOneDocument() Dim objSingleWord As Range For Each objSingleWord In ActiveDocument.Words objSingleWord.Font.SizeBi = objSingleWord.Font.Size Next End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Swarup | Word | 31 | 08-28-2018 06:55 PM |
Global formatting and changing title font | George Tang | OneNote | 0 | 02-05-2016 06:55 PM |
Font size showing different (some superscripted??) but tools show its the same size? | mikkygee | PowerPoint | 4 | 12-14-2015 11:21 PM |
![]() |
WH7262 | Word VBA | 1 | 08-26-2014 03:46 PM |
Cursor size varies with font size | r_lewis@fuse.net | Word | 0 | 07-20-2011 06:11 PM |