E
E
e1s2015-12-24 10:41:24
VBScript
e1s, 2015-12-24 10:41:24

How to programmatically set bold font in Word?

I form the text through bookmarks in worde using VBScript, are there any "tags" so that the Word converts sections of text in bold, by analogy with the html tag

function main
  main =  "Значение" 
 end function

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
coderisimo, 2015-12-24
@coderisimo

With ActiveDocument.Content.Find
.ClearFormatting
.Font.Bold = False
With .Replacement
.ClearFormatting
.Font.Bold = True
End With
.Execute FindText:="", ReplaceWith:="", _
Format:=True, Replace:= wdReplaceAll
End With

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question