ferroclever.blogg.se

In microsoft word for mac 2011 how do i single space
In microsoft word for mac 2011 how do i single space












in microsoft word for mac 2011 how do i single space

If we wanted to un-boldface each instance of Fabrikam we would set the Font.Bold property to False. Here we use the Replacement object (a child object of the Find object) and specify that the Font.Bold property should be True. But once we find them how do we boldface each of those instances? Here’s how: .Bold = True Yes, we are kind of zipping through the explanation here, aren’t we? But that’s OK: after all, we have an Office Space article that discusses the process of finding and replacing text in more detail.Īll that gives us a mechanism for finding all instances of the word Fabrikam. That would give us something similar to this: FabrikamCorporation. If MatchWholeWord was set to False, then any instance of the string Fabrikam would be boldfaced. Finally, we set the MatchWholeWord property to True we do this just in case there happens to be some crazy construction like FabrikamCorporation in the document. Next we set the Forward property to True this ensures that our search will start at the beginning of the document and end at, well, the end of the document. What we want to do is boldface any instances of the word Fabrikam hence we set the value of the Find object’s Text property to “Fabrikam” (in other words, that’s what we’re searching for).

in microsoft word for mac 2011 how do i single space

We use the Open method to open the document C:\Scripts\Test.doc, then create an instance of the Word Selection object (which, by default, positions the cursor at the beginning of the document). After defining a constant named wdReplaceAll (we’ll talk about that in a moment), we create an instance of the Word.Application object and then set the Visible property to True this gives us an instance of Microsoft Word that we can see on screen. ,wdReplaceAllĪs you can see, not only was this a fun script to write but – as an added bonus – it was an easy script to write, too.

in microsoft word for mac 2011 how do i single space

Set objWord = CreateObject(“Word.Application”) Regardless of what motivated us, here’s what we came up with: Const wdReplaceAll = 2 You know, things like the phrase I am too alive. Or maybe it’s because all the dead people we brought back to life have been pretty insistent that we go through their documents and boldface specific words. Or maybe it’s because this request offered a bit of a challenge: although we were pretty sure that we could write a script that would boldface specific words in a document we’d never actually tried it. Maybe it’s because we’re always looking for a script that uses Microsoft Word scripting with Word is actually kind of fun. You have a script that can bring the dead back to life? Hey, who doesn’t?įor some reason, though, SB, your question piqued our interest.

in microsoft word for mac 2011 how do i single space

You have a script that monitors folders and lets you know when new files are added? Been there, done that. You say you have a script that automatically backs up and clears all the event logs on all your computers? How nice. You’ll probably find this hard to believe, but when you work with scripts and scripting all day you tend to get a little jaded. Hey, Scripting Guy! How can I boldface a specific word throughout a Microsoft Word document?














In microsoft word for mac 2011 how do i single space