|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Object requiredHello. I am comparing the beginning of a string to another string using the
StartsWith() function. My line of code is: if checkPrinter.StartsWith("\\medea\") then WshNetwork.RemovePrinterConnection oPrinters.Item(i+1), true, false end if When the program gets to the line with the StartsWith(), I get an error stating: Object Required: 'Microsoft Office Doc' Anybody know what this means? I am using Visual Studio .net 2003 to do a ..vbs. Thanks for any help!! Brian What kind of object is checkPrinter?
Brian wrote: Show quoteHide quote > Hello. I am comparing the beginning of a string to another string using the > StartsWith() function. My line of code is: > > if checkPrinter.StartsWith("\\medea\") then > WshNetwork.RemovePrinterConnection oPrinters.Item(i+1), true, false > end if > > When the program gets to the line with the StartsWith(), I get an error > stating: > > Object Required: 'Microsoft Office Doc' > > Anybody know what this means? I am using Visual Studio .net 2003 to do a > .vbs. Thanks for any help!! > > Brian Its a string that holds the path to a printer such as: \\medea\printer1
Show quoteHide quote "Charlie Brown" wrote: > What kind of object is checkPrinter? > > Brian wrote: > > Hello. I am comparing the beginning of a string to another string using the > > StartsWith() function. My line of code is: > > > > if checkPrinter.StartsWith("\\medea\") then > > WshNetwork.RemovePrinterConnection oPrinters.Item(i+1), true, false > > end if > > > > When the program gets to the line with the StartsWith(), I get an error > > stating: > > > > Object Required: 'Microsoft Office Doc' > > > > Anybody know what this means? I am using Visual Studio .net 2003 to do a > > .vbs. Thanks for any help!! > > > > Brian > > Use this instead.
if InStr(1, checkPrinter, "\\medea\") then WshNetwork.RemovePrinterConnection oPrinters.Item(i+1), true, false end if Brian wrote: Show quoteHide quote > Its a string that holds the path to a printer such as: \\medea\printer1 > > "Charlie Brown" wrote: > > > What kind of object is checkPrinter? > > > > Brian wrote: > > > Hello. I am comparing the beginning of a string to another string using the > > > StartsWith() function. My line of code is: > > > > > > if checkPrinter.StartsWith("\\medea\") then > > > WshNetwork.RemovePrinterConnection oPrinters.Item(i+1), true, false > > > end if > > > > > > When the program gets to the line with the StartsWith(), I get an error > > > stating: > > > > > > Object Required: 'Microsoft Office Doc' > > > > > > Anybody know what this means? I am using Visual Studio .net 2003 to do a > > > .vbs. Thanks for any help!! > > > > > > Brian > > > > It worked great! Thanks alot!!!!
Show quoteHide quote "Charlie Brown" wrote: > Use this instead. > > if InStr(1, checkPrinter, "\\medea\") then > WshNetwork.RemovePrinterConnection oPrinters.Item(i+1), true, false > end if > > Brian wrote: > > Its a string that holds the path to a printer such as: \\medea\printer1 > > > > "Charlie Brown" wrote: > > > > > What kind of object is checkPrinter? > > > > > > Brian wrote: > > > > Hello. I am comparing the beginning of a string to another string using the > > > > StartsWith() function. My line of code is: > > > > > > > > if checkPrinter.StartsWith("\\medea\") then > > > > WshNetwork.RemovePrinterConnection oPrinters.Item(i+1), true, false > > > > end if > > > > > > > > When the program gets to the line with the StartsWith(), I get an error > > > > stating: > > > > > > > > Object Required: 'Microsoft Office Doc' > > > > > > > > Anybody know what this means? I am using Visual Studio .net 2003 to do a > > > > .vbs. Thanks for any help!! > > > > > > > > Brian > > > > > > > >
bring an already running app to the front
How do you get to this newsgroup quickly, AND STAY HERE? How can you convert an integer into a VB.NET color? Requesting advice: shared properties vs other class interactions. Upload a file in a web server with a WinForm Lost focus ChartFX Slowness how do I get date and time of compilation Easy one, displaying field in a textbox Windows Form Hosting Word Document |
|||||||||||||||||||||||