Вниз
Скачать: CL | DM;

Как узнать автора файла документа ?   Найти похожие ветки 

 
blackman ©   (2003-01-19 11:46) [0]

Имя, дата, размер - без проблем.
А автор?
И то-же для DOC файлов. Где и как выдернуть ?


 
AlexKniga ©   (2003-01-19 15:13) [1]

Это реализовывает интерфейс {83799FE0-1F5A-11d1-95C7-00609797EA4F}
Если возникнут общие вопросы, то см. COM, ShellEx


 
asmith   (2003-01-19 16:55) [2]

Вот простой пример, подробности в MSDN:

uses ActiveX, ComObj, SysUtils;

function GetSummaryInfAuthor(FileName: TFileName): string;
var
PFileName: PWideChar;
Storage: IStorage;
PropSetStg: IPropertySetStorage;
PropStg: IPropertyStorage;
ps: PROPSPEC;
pv: PROPVARIANT;
const
FMTID_SummaryInformation: TGUID = "{F29F85E0-4FF9-1068-AB91-08002B27B3D9}";
begin
PFileName := StringToOleStr(FileName);
try
// Open compound storage
OleCheck(StgOpenStorage(PFileName, nil, STGM_DIRECT or STGM_READ or STGM_SHARE_EXCLUSIVE, nil, 0, Storage));
finally
SysFreeString(PFileName);
end;

// Summary information is in a stream under the root storage
PropSetStg := Storage as IPropertySetStorage;
// Get the IPropertyStorage
OleCheck(PropSetStg.Open(FMTID_SummaryInformation, STGM_DIRECT or STGM_READ or STGM_SHARE_EXCLUSIVE, PropStg));

// We want the author property value
ps.ulKind := PRSPEC_PROPID;
ps.propid := PIDSI_AUTHOR;

// Read this property
PropStg.ReadMultiple(1, @ps, @pv);

Result := pv.pszVal;
end;


 
blackman ©   (2003-01-19 17:35) [3]

А для Word"овских ?
Из них я выдергиваю статистику, а вот автора и ключевые слова как ?


 
asmith   (2003-01-19 17:37) [4]

Это для любых structured storage file, офисные документы как раз таковыми и являются.


 
blackman ©   (2003-01-19 17:58) [5]

Извините сам понял, что не прав. Если нужна такая программка, напишите выложу исходник



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.01 c
1-86882
UserL
2003-01-20 12:33
2003.01.27
TClientDataSet


14-87084
VictorT
2002-12-20 21:32
2003.01.27
Глюк в 6-м IE?


1-86957
viper
2003-01-17 10:10
2003.01.27
DLL and EXE


1-86754
laser
2003-01-15 23:30
2003.01.27
помогите пожалуйста разобрать (что-то не работает)


1-86853
dron655
2003-01-19 20:27
2003.01.27
StringGrid




   Наверх