Unit WpInfo

TWpInfo - Object which accesses the extended document summary information (like abstract, subject, author etc.) in a Wordperfect 6/7/8 document. -------- -------- -------- -------- -------- -------- -------- -------- Copyrights (C) 1998 ved T. Skovmand Eriksen email: TSEriksen@cyberdude.com ALL RIGHTS RESERVED -------- -------- -------- -------- -------- -------- -------- -------- This source may be used as follows: * In development of in-house applications which will not be published. * In development of freeware applications PROVIDED that credit is given to me, Troels S Eriksen, in the applications aboutbox and/or helpfile. * In development of shareware and commercial applications PROVIDED that I, Troels S Eriksen, recieve a free unlimited copy of all versions of said application AND that credits are given to me in the applications aboutbox or helpfile. * In printed or electronic form (fx. in a book) or in a source-library (fx. on CD) PROVIDED that I, Troels S Eriksen, recieve a royality-free unlimited copy of said book or library. * In any other way PROVIDED that I, Troels S Eriksen, give my explicit permission to the suggested use. By using this source you do acknowledge that the above restrictions apply to you and your use of this source and that you will confirm by them. You also acknowledge, that you will take full responsibility for any damage that may occur due to use of this source. -------- -------- -------- -------- -------- -------- -------- -------- Revision history: Rev 01 - Wordperfect extended summary reader functions created Rev 02 - Updates for converting Wp Charset charcodes to Ansi Rev 03 - Rewritten into an object class. -------- -------- -------- -------- -------- -------- -------- -------- Thanks to: * Warny Saurbrey - My favorite tester (poor guy). * Corel Corp. - Who added the Wp SDK to the Wp Suite and brought WP really into the 32bit world. -------- -------- -------- -------- -------- -------- -------- -------- Properties: Filename File to get extended document summary from. Info is read when filename is assigned. Methods: Create Creates the object Destroy Destroys the object Free Frees the object (a bit of a surprise here) GetSummary Returns the wanted summary string. -------- -------- -------- -------- -------- -------- -------- -------- Demo application: No way! But create an empty project add a Button, an OpenDialog and a Listbox to the mainform. Then add the following code to the buttons OnClick event. procedure TForm1.Button1Click(Sender:TObject); var Summary : TWpInfo; begin try Summary:=TWpInfo.Create; if OpenDialog1.execute then begin Summary.Filename:=Opendialog1.filename; ListBox1.Items.add(Summary.GetSummary(tsSubject)); ListBox1.Items.add(Summary.GetSummary(tsDescriptiveName)); end; finally Summary.Free; end; end; This should get you going :-) -------- -------- -------- -------- -------- -------- -------- -------- Known bugs: * Cannot handle the OLE2 header wrapper. Don't know what will happen if such a thing is ever encountered. -------- -------- -------- -------- -------- -------- -------- --------

Classes

TWpInfo -

Functions

WordperfectSummary - This procedure handles the actual reading of summary info.

Types

TSummary

Constants

Variables


Functions


procedure WordperfectSummary(const filename:string;Summary:TStrings);

This procedure handles the actual reading of summary info.

Open document, return handle for all subsequent use


Types


TSummary = (
    tsAbstract,        tsAccount,         tsAddress,         tsAttachments,
    tsAuthor,          tsAuthorization,   tsBillTo,          tsBlindCopy,
    tsCarbonCopy,      tsCategory,        tsCheckedBy,       tsClient,
    tsComments,        tsCreationDate,    tsDateCompleted,   tsDepartment,
    tsDescriptiveName, tsDescriptiveType, tsDestination,     tsDisposition,
    tsDivision,        tsDocumentNumber,  tsEditor,          tsForwardTo,
    tsGroup,           tsKeywords,        tsLanguage,        tsMailStop,
    tsMatter,          tsOffice,          tsOwner,           tsProject,
    tsPublisher,       tsPurpose,         tsReceivedFrom,    tsRecordedBy,
    tsRecordedDate,    tsReference,       tsRevisionDate,    tsRevisionNotes,
    tsRevisionNumber,  tsSection,         tsSecurity,        tsSource,
    tsStatus,          tsSubject,         tsTelephoneNumber, tsTypist,
    tsVersionDate,     tsVersionNotes,    tsVersionNumber
    );
Wordperfect 6,7,8 extended summary flags - dont mess with those, unless you know what you're doing, okay?

Constants


Variables