Archive for November, 2012
Word.Application Trolling in PowerShell
by dwarfsoft on Nov.21, 2012, under Scripting, Work
I’ve been doing a little bit of investigation into OneNote and Word in PowerShell. So after this I got around to thinking of some of the mischievous things that could be achieved with some of the things I’ve learned… Like enumerating all documents, and in those documents enumerating all sentences, and then providing a 1% opportunity to replace its Font with Wingdings.
The following script demonstrates managing multiple threads, and managing the closure of those threads/jobs once they are complete. I’ve tested this on my C:\Temp folder with a number of documents in it, and the results are as expected. It provides some amusing opportunities for trolling.
PowerShell PowerISE Copy-Script Add-On
by dwarfsoft on Nov.16, 2012, under Uncategorized
One of the most useful things I get to use in day to day scripting is Copy-Script. It is a script that I originally picked up from this msdn blog. I have since made a couple of modifications to allow me to reload it with the rest of my profile, as well as my most recent addition: Converting the Formatted Text to Word Document format.
The reason I needed to use Word Document format was due to OneNote and Lync not taking the RTF formatted data until it had been pasted and copied out of Microsoft Word. Therefore I added the following process into the end of the script: