I have working with word document in lotus R7. During that I have create word doc object, assigned it to word document & then print that document. But in print action I found Automation Object Error.My Code is :-
Sub Initialize
On Error Goto errorHandler
Dim path As String
path = “C:\Sample1.doc”
Set wdo = CreateObject(“Word.Application”)
wdo.visible=True
Set wdocs = wdo.Documents
Msgbox “PQRE”
wdo.ActivePrinter = “\sphinx\HP”
Set wdoc = wdocs.Open(path )
wdoc.PrintOut ’ Automation Error Occured
Exit Sub
errorHandler:
Msgbox “error is At:- “& Cstr(Erl()) & " error is :-” & Error() & " in agSam123”
Call KillWordObject()
Exit Sub
End Sub
Error is at line “Set wdoc = wdocs.Open(path )” Does Some One has any idea about how to solve Automation error.
I have also close all word application before running this code.
I have also run same code on R6.5 It Run Well On R6.5. But On 7 It shows Automation Error. Does There is any different in Print Command of R6.5 & R7. If so then which is it. Does any one has some idea about it.
Thanx