Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Using this link I was able to write a program in vba that reads extended file properties. Now, I'd like to make a program that can edit extended file properties - specifically property 22, the "subject" of a file. So, given a file path, how could you edit the subject associated with that file?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
621 views
Welcome To Ask or Share your Answers For Others

1 Answer

It can't be done using the method you are using now. You can install and use the Microsoft ActiveX dsofile.dll to both get and set extended properties using VBScript.

Set objFile = CreateObject("DSOFile.OleDocumentProperties")
objFile.Open("C:My PathMyFile.doc")
objFile.SummaryProperties.Subject = "My Subject"
objFile.Save
set objFile = Nothing

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...