/build/static/layout/Breadcrumb_cap_w.png

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?

0 Comments   [ + ] Show comments

Answers (1)

Posted by: wiseapp 18 years ago
Second Degree Green Belt
2
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ