def _get_properties(self, properties):
"""
Use OLE property sets to get base properties
"""
try:
pss = self.stg.QueryInterface(pythoncom.IID_IPropertySetStorage )
except pythoncom.com_error as e:
self._trace('No Property information could be retrieved', e)
return
ps = pss.Open(PSGUID_SUMMARYINFORMATION)
props = (PIDSI_TITLE, PIDSI_SUBJECT, PIDSI_AUTHOR, PIDSI_KEYWORDS, PIDSI_COMMENTS)
title, subject, author, keywords, comments = ps.ReadMultiple(props)
if title is not None:
properties['title'] = title
if subject is not None:
properties['description'] = subject
if author is not None:
properties['author'] = author
if keywords is not None:
properties['keywords'] = keywords
if comments is not None:
properties['comments'] = comments
评论列表
文章目录