Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Insert Text Into an Existing Microsoft Word BookmarkContent of Insert Text Into an Existing Microsoft Word Bookmark.vbsMD5 Hash: 0BB23A2EBF0BCC590FEE9250EF3E325B |
||
Set objWord = CreateObject("Word.Application")
objWord.Visible = True Set objDoc = objWord.Documents.Open("C:\Scripts\Test.doc") Set objNetwork = CreateObject("Wscript.Network") strUser = objNetwork.UserName strDomain = objNetwork.UserDomain strComputer = objNetwork.ComputerName Set objRange = objDoc.Bookmarks("UserBookmark").Range objRange.Text = strUser objDoc.Bookmarks.Add "UserBookmark",objRange Set objRange = objDoc.Bookmarks("DomainBookmark").Range objRange.Text = strDomain objDoc.Bookmarks.Add "DomainBookmark",objRange Set objRange = objDoc.Bookmarks("ComputerBookmark").Range objRange.Text = strComputer objDoc.Bookmarks.Add "ComputerBookmark",objRange | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |