V
Vik
Hello again
I have a problem with Word trying to shut down before the document is saved. I put a sleep statement between the commands and that helps. The size of the document varies and the larger documents cause more problems. Below is a snippit of code showing the saving and closing code
Info.Caption = "Word is creating the password
oWD.WritePassword = (frmTab0.Text0(4).Text) & CStr(Left$(CDec(Now()), 5)) & CStr(Right$(CDec(Now()), 1)
oWA.Activate 'Shift focus to Wor
Info.Caption = "Word is saving the file
oWA.ActiveDocument.SaveAs FileName:="c:\program files\tabs\ards\" & frmTab0.Text0(4) & ".doc
Sleep 200
Info.Caption = "Word is closing the file
oWA.ActiveDocument.Clos
oWA.Qui
Set oWA = Nothin
As always, any help is appreciated, Vik
Please don't respond to the email address since it is my MSDN alias.
I have a problem with Word trying to shut down before the document is saved. I put a sleep statement between the commands and that helps. The size of the document varies and the larger documents cause more problems. Below is a snippit of code showing the saving and closing code
Info.Caption = "Word is creating the password
oWD.WritePassword = (frmTab0.Text0(4).Text) & CStr(Left$(CDec(Now()), 5)) & CStr(Right$(CDec(Now()), 1)
oWA.Activate 'Shift focus to Wor
Info.Caption = "Word is saving the file
oWA.ActiveDocument.SaveAs FileName:="c:\program files\tabs\ards\" & frmTab0.Text0(4) & ".doc
Sleep 200
Info.Caption = "Word is closing the file
oWA.ActiveDocument.Clos
oWA.Qui
Set oWA = Nothin
As always, any help is appreciated, Vik
Please don't respond to the email address since it is my MSDN alias.