L
lieven
I have a word document embedded in an excel worksheet
when i try to print the document from vba i get an automation error.
my code is something like this
sub test()
dim owordapp as word.application
dim oworddoc as word.document
dim oembobj as oleobject
set oembobj=thisworkbook.somesheet.oleobjects("mydoc")
oembobj.activate
set owordapp=oembobj.object.application
set oworddoc=owordapp.activedocument
oworddoc.printout
......
end sub
using office 2003 on xp sp2 system
when i try to print the document from vba i get an automation error.
my code is something like this
sub test()
dim owordapp as word.application
dim oworddoc as word.document
dim oembobj as oleobject
set oembobj=thisworkbook.somesheet.oleobjects("mydoc")
oembobj.activate
set owordapp=oembobj.object.application
set oworddoc=owordapp.activedocument
oworddoc.printout
......
end sub
using office 2003 on xp sp2 system