![]() You can literally open word, start the macro recorder, try what you are doing my clicking through the doc, the recorder would write the code for you, that you can that save and put into your script. Trying things like $ or $doc.DeleteAllComments. Never run any code you do not fully understand / can trust, no matter where you get it from. Though the above is about counting, the same type of approach can be used to remove. $word = New-Object -comobject word.applicationįoreach($filepath in (Get-ChildItem $path -Filter *.docx -Recurse)) Use PowerShell to Count Comments in Word Docs $Path = "E:\data\BookDOcs\PS3_StartHere" ![]() Weekend Scripter: Add Comment to Word Doc Manipulating word with PowerShell all over the web. There are lots of examples of how to leverage PowerShell to affect word and other docs. you have to understand Word programming and the Office DOM to do this. Use the Word DOM language to make whatever changes you are after. you have to understand PowerShell to do this. You need to call into the MSOffice DOM, using COM with PowerShell.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |