MS office Need to change author of file to Users NT ID
Hi,
I need to create a package which changes the Author field of Word, Excel and Powerpoint file to the user logged into to the computer. I checked the registry and seems like the key is encrypted.
Any suggestions?
I need to create a package which changes the Author field of Word, Excel and Powerpoint file to the user logged into to the computer. I checked the registry and seems like the key is encrypted.
Any suggestions?
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
wiseapp
19 years ago
Hi Arjun:
Well I could not find a way to do this thru Registry however you could do this by registering a dsofile.dll which can be downloaded from the internet Click Here to download DSO file and then using this vbscript to change any office document properties:
Dim strFile, objFilePropReader, objDocProp
Dim strName, strAppName, strTitle, strAuthor, strComments, strWordCount
strFile = "C:\scripts\Test file.doc"
Set objFilePropReader = CreateObject("DSOleFile.PropertyReader")
Set objDocProp = objFilePropReader.GetDocumentProperties(strFile)
strName = objDocProp.Name
strAppName = objDocProp.AppName
strTitle = objDocProp.Title
strAuthor = objDocProp.Author
strComments = objDocProp.Comments
strWordCount = objDocProp.WordCount
objDocProp.CustomProperties.Add "TestProp", "Test Prop Value"
MsgBox strName & vbCrLf & strAppName & vbCrLf & strTitle & vbCrLf & strAuthor & vbCrLf & strComments & vbCrLf & strWordCount
For Each objCustProp In objDocProp.CustomProperties
MsgBox objCustProp.Name & ": " & CStr(objCustProp.Value)
Next
In case should you require any further clarifications regarding the same kindly revert back.
Well I could not find a way to do this thru Registry however you could do this by registering a dsofile.dll which can be downloaded from the internet Click Here to download DSO file and then using this vbscript to change any office document properties:
Dim strFile, objFilePropReader, objDocProp
Dim strName, strAppName, strTitle, strAuthor, strComments, strWordCount
strFile = "C:\scripts\Test file.doc"
Set objFilePropReader = CreateObject("DSOleFile.PropertyReader")
Set objDocProp = objFilePropReader.GetDocumentProperties(strFile)
strName = objDocProp.Name
strAppName = objDocProp.AppName
strTitle = objDocProp.Title
strAuthor = objDocProp.Author
strComments = objDocProp.Comments
strWordCount = objDocProp.WordCount
objDocProp.CustomProperties.Add "TestProp", "Test Prop Value"
MsgBox strName & vbCrLf & strAppName & vbCrLf & strTitle & vbCrLf & strAuthor & vbCrLf & strComments & vbCrLf & strWordCount
For Each objCustProp In objDocProp.CustomProperties
MsgBox objCustProp.Name & ": " & CStr(objCustProp.Value)
Next
In case should you require any further clarifications regarding the same kindly revert back.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.