如何更改非英语单词的字体大小?
在Word 2007文档中,我手动选择了一个包含英语和英语的句子.多种字体大小的孟加拉语单词.当我在面板的字体大小"列表框中输入一些数值并按Enter时,整个句子的字体大小都会更改(包括孟加拉语单词).
In a Word 2007 document, I manually select a sentence containing both English & Bengali words of multiple font size. When I enter some numeric value in Font size list-box in the panel and press Enter, the whole sentence font size is changed (including Bengali words).
当我在Word-VBA宏中选择相同的句子并在最后一行尝试
When I select the same sentence in a Word-VBA macro and in final line try
Selection.font.Size=8
只有英文单词的字体大小会改变.
only English words' font size gets changed.
- 我试图遍历每个字符,但是得到了相同的结果.
- 我需要坚持使用Word-VBA,因为它是使用Chrome网络驱动程序Selenium的网络抓取程序的一部分.
- 我在一个手动创建的Word文档中尝试了一个简单的宏,该文档中带有Vrinda(Body CS)字体的手动键入的英语和孟加拉语混合单词,结果是相同的.选择了整个句子,但仅更改了英语单词的字体.
示例文本我很好,你还好吗?"
Sample Text "I am Ok You are Ok আমিও ঠিক তুমিও ঠিক Is it ok"
Word区分格式为从左到右(LTR)的文本和格式为从右到左(RTL)的文本.我不熟悉书面(或口语)孟加拉语,但Word显然认为它是RTL.在对象模型(VBA)中,有一组单独的RTL字体属性-后缀 Bi
被添加到属性名称中.所以
Word differentiates between text formatted as left-to-right (LTR) and text formatted as right-to-left (RTL). I'm not familiar with written (or spoken) Bengali, but Word apparently considers it to be RTL. In the object model (VBA) there's a separate set of Font properties for RTL - the suffix Bi
is added to the property name. So
Selection.Font.Size = 8
Selection.Font.SizeBi = 8
应该同时使用两种语言.
Should take care of both languages.