Originally posted by shadabrab
[CODE=vb]dim obj1 as object
set obj1=createobje ct("word.applic ation")
with obj1
.documents.open ("c:\myDoc.doc" )
.visible=true
.[any word's command]
end with[/CODE]
Now, remember that if you have a word constant, it wont be recognized in your Excel VBA, so instead of writing the constant, write its numeric value.
HTH
Leave a comment: