-
ActiveX & Word Problem
Hi,
i'm having a problem with using word from an ActiveX dll the problem is this
Code:
Dim appWord as New Word.Application
' Following line causes word to lock up, must be Ctrl + Alt + Del killed
appWord.ActivePrinter = "PRINTER NAME"
appWord.quit
Set appWord = Nothing
however the following code fragment won't cause word to lockup
Code:
Dim appWord as New Word.Application
' Following line causes word to lock up, must be Ctrl + Alt + Del killed
appWord.ActivePrinter = ""
appWord.quit
Set appWord = Nothing
Any idea what i'm doing wrong?
The string I am trying to set ActivePrinter to is definetely that of a correct printer and i've tryed adding " on LTP1: to the end of the string, does make any difference, THe following code fragment even crashes word
Code:
Dim appWord as New Word.Application
Dim tmpPrinter as string
tmpPrinter = appWord.ActivePrinter
' Following line causes word to lock up, must be Ctrl + Alt + Del killed
appWord.ActivePrinter = tmpPrinter
appWord.quit
Set appWord = Nothing