a guest Oct 21st, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- $wdStory = 9
- $wdMove = 0
- $objWord = New-object -comobject Word.Application
- $objWord.Visible = $True
- $objDoc = $objWord.Documents.Open("c:\temp\test.docx")
- $objSelection = $objWord.Selection
- $a = $objSelection.EndKey($wdStory, $wdMove)
- $text = "This text appended"
- [System.Runtime.Interopservices.Marshal]::ReleaseComObject($objDoc) | Out-Null
- [System.Runtime.Interopservices.Marshal]::ReleaseComObject($objWord) | Out-Null
RAW Paste Data