Board index » delphi » WordBasic

WordBasic

Anyone knows how to get the author's name from the current document using
wordbasic/ole?.

 

Re:WordBasic


Quote
"coolvip" <dann...@usa.net> wrote:
>Anyone knows how to get the author's name from the current document using
>wordbasic/ole?.

Straight from the WordBasic help file (w/minor modifications for what
you want--I think):

        FileSummaryInfo .Update 'Update document statistics

        Dim dlg As DocumentStatistics   'Create a dialog record

        GetCurValues dlg        'Fill record with values

        MsgBox "Number of words: " + dlg.Words
        MsgBox "Document author is " + dlg.LastSavedBy

Alternatively, you could do the following:

        FileSummaryInfo .Update 'Update document statistics

        Dim dlg As FileSummaryInfo      'Create a dialog record

        GetCurValues dlg        'Fill record with values

        MsgBox "Document author is " + dlg.Author

Hope this helps.

Mike
------------------------------------------------------
- Mike Bandor  (band...@jcave.com)
-
- Computer programmer:  Ada/C++/Windows/
-                       Winhelp/JOVIAL/MASM
-                              
- "Trying to manage programmers    
-  is like trying to herd cats!"          
-
- Speaking for myself!  Standard disclaimer applies.
------------------------------------------------------
- Author of MEGATERMS:  Military Terms and Acronyms
- http://www.jcave.com/~bandorm/megaterm/megaterm.htm
- ftp://jcave.com/usr/b/bandorm/m-term.zip
------------------------------------------------------

Other Threads