Document Info Into VB5? Help!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Document Info Into VB5? Help!

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Document Info Into VB5? Help!

    [Originally posted by Dave]

    Please Help Me! I Need to read a MS WORD documents Summary info into VB 5 (you know, right click on a word documents properties and go to summary). Things like the Title and Subject.

    Many Thanks in advance!
    Dave

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Document Info Into VB5? Help!

    [Originally posted by Jim]

    assuming you have a word doc object = doc

    doc.builtindocumentproperties(1) 'title
    doc.builtindocumentproperties(2) 'subject
    doc.builtindocumentproperties(3) 'author
    doc.builtindocumentproperties(4) 'keywords
    doc.builtindocumentproperties(5) 'comments
    doc.builtindocumentproperties(6) 'template
    doc.builtindocumentproperties(7) 'last author
    doc.builtindocumentproperties(8) 'revision number
    doc.builtindocumentproperties(9) 'app name
    doc.builtindocumentproperties(10) 'last print date
    doc.builtindocumentproperties(11) 'creation date
    doc.builtindocumentproperties(12) 'last save time
    doc.builtindocumentproperties(13) 'total editing time
    doc.builtindocumentproperties(14) 'number of pages
    doc.builtindocumentproperties(15) 'number of words
    doc.builtindocumentproperties(16) 'numer of chars
    doc.builtindocumentproperties(17) 'security
    doc.builtindocumentproperties(18) 'catgory
    doc.builtindocumentproperties(19) 'format
    doc.builtindocumentproperties(20) 'manager
    doc.builtindocumentproperties(21) 'company
    doc.builtindocumentproperties(22) 'number of bytes
    doc.builtindocumentproperties(23) 'number of lines
    doc.builtindocumentproperties(24) 'number of paragraphs
    doc.builtindocumentproperties(25) 'number of slides
    doc.builtindocumentproperties(26) 'number of notes
    doc.builtindocumentproperties(27) 'number of hidden slides
    doc.builtindocumentproperties(28) 'number of media clips
    doc.builtindocumentproperties(29) 'hyperlink base
    doc.builtindocumentproperties(30) 'number of chars with spaces

  3. #3
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Re:Document Info Into VB5? Help!

    [Originally posted by Dave]

    Im not sure I know how to you this?

    Dave

  4. #4
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Re:Re:Document Info Into VB5? Help!

    [Originally posted by Jim]

    Try something like this

    dim wrd as Word.Application
    dim doc as Word.Document

    set wrd = createobject("Word.Application")
    wrd.visible = true
    set doc = wrd.documents.open("C:\MyDoc.doc")
    msgbox "The title is " & doc.builtindocumentproperties(1)
    msgbox "The subject is " & doc.builtindocumentproperties(2)

  5. #5
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Re:Re:Re:Document Info Into VB5? Help!

    [Originally posted by Dave]

    Thanks for all your help mate, i just got it working Monday morning. Who said Mondays were the worst day of the week!

    Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center