Results 1 to 1 of 1

Thread: ActiveX & Word Problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 1999
    Location
    Hamilton, New Zealand
    Posts
    137

    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
    Last edited by mattbrown; May 9th, 2001 at 04:16 AM.
    Regards

    Matt Brown
    Hamilton, NZ
    VB6 C++ in Visual Studio 6sp4
    VB.net Beta 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width