Mark Bystry wrote: > getting even closer. figure out how to write to a file but still in vbscript. > > dsofile_write.vbs > code: > Set objFile = CreateObject("DSOFile.OleDocumentProperties") > objFile.Open("D:\test.txt") > objFile.SummaryProperties.Category = "CAT54" > objFile.Save
In Python, that's spelt: <code> import win32com.client props = win32com.client.Dispatch ("DSOFile.OleDocumentProperties") props.Open (r"c:\temp\test.txt") props.SummaryProperties.Category = "CAT54" props.Save () </code> but when I tried doing it, I got a COM error on the line where the Category is written. It worked ok with Subject instead. Wouldn't have thought this was down to Python, but I've not got much to go on! TJG _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor