Word from excel Vba

B

Bruno Molteni

I have a question for the newsgroup:

I have an xla application in excel and I need to read some word documents
and use some vba word commands.
Is there a way to do this think?

Thank you

Bruno
 
H

Helmut Weber

Hi Bruno,
set a reference to the word library (extras, references)
then
untested, bware of typos,
dim oWrd as word.application
set oWrd = new word.application
or use getobject to refer to a running instance of word
then
with oWrd
' all word-objects, properties and methodes are available like
msgbox owrd.characters.count
end with

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
Top