I have a script where I am replacing a bookmark in a word document with text from a xml.
I have hard coded a few words into the word document via the bookmark properties. I am trying to turn the font of the strings I hardcoded into the document into bold and increase the font size
StigData is predefined earlier in my script... The script works fine its just not bolding the font.
foreach ($stigDataItem in $stigData)
$doc.Bookmarks.Item("AllStigInfo").Range.Text ="FixText" + "`r`n" + $ft + "`r`n" +"`r`n"
$selection = $wd.selection
I attempted to select the words I need to replace and replace it with a bold font with the section:
However that just added a bold word to the document.
I am trying to bold everywhere that says FixText, Check Content, and $title. Also making $title a bigger font.
Also tried referring to https://blogs.technet.microsoft.com/heyscriptingguy/2006/02/01/how-can-i-boldface-a-specific-word-throughout-a-microsoft-word-document/ but it didn't work out for me.
You must be logged in to reply to this topic.