We help IT Professionals succeed at work.
Get Started

accessing ms word  doc prop

108a asked
Last Modified: 2010-05-03

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))
'End With

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

how do i get them without  opening the document ?


Watch Question
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE