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.applica tion")
End If
wordapp.Documents.Open ("C:\taclient\Help\TAeSeri es Trans Quick Start.doc")
' Set worddoc = wordApp.Documents.Open("C: \taclient\ Help\TAeSe ries Trans Quick Start.doc")
'With worddoc
MsgBox Val(wordapp.ActiveDocument .BuiltInDo cumentProp erties(wdP ropertyCha rsWSpaces) )
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
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.applica
End If
wordapp.Documents.Open ("C:\taclient\Help\TAeSeri
' Set worddoc = wordApp.Documents.Open("C:
'With worddoc
MsgBox Val(wordapp.ActiveDocument
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.