Link to home
Start Free TrialLog in
Avatar of 108a
108a

asked on

accessing ms word doc prop

hi


i find  word.application class  always very complicated to use  specially when it comes to   documents  and  its properties  . i never  understood its hierarchy.. i tryin to do following things

i want to get  properties of  document like  wordcount, charcount ,charcountwithout spaces ...etc  i want to get them  without  opening the document actually ..  coz it takes lot of time to open the document and close..

here  is my code


    Dim wordapp As Word.Application
  '  Dim worddoc As Word.Document
    Set wordApp = GetObject(, "Word.Application")
   
    If wordapp Is Nothing Then
        Set wordapp = CreateObject("Word.application")
    End If
   
  wordapp.Documents.Open ("C:\taclient\Help\TAeSeries Trans Quick Start.doc")
   
 ' Set worddoc = wordApp.Documents.Open("C:\taclient\Help\TAeSeries Trans Quick Start.doc")
'With worddoc

    MsgBox Val(wordapp.ActiveDocument.BuiltInDocumentProperties(wdPropertyCharsWSpaces))
     wordapp.Documents.Close
 'worddoc.ac
'End With

wordapp.Quit (0)
'Set worddoc = Nothing
Set wordapp = Nothing


how do i get them without  opening the document ?

thanx











ASKER CERTIFIED SOLUTION
Avatar of Manwe
Manwe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial