Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

webbrowser and object doesn't support this property ....

Status
Not open for further replies.

rturner003

Programmer
Nov 20, 2001
21
GB
I have tried several routines, on different browsers and different machines but when I try using the webbrowser control all I get is a script error of 'object doesn't support this propert or method'.

For example this is a piece of code from a MSDN page:

HTML:
[HEAD]
[OBJECT ID="wbp"
CLASSID="CLSID:778C58A9-81B6-11D3-BB8F-00C04FA3471C"]
[/OBJECT]
[SCRIPT LANGUAGE="VBScript"]
   Sub Print()
       If Len(wbp.DefaultPrinterName) = 0 Then
           MsgBox "No default printer!"
           Exit Sub
       End If
       wbp.Header = "My Header"
       wbp.Orientation = 2 ' Landscape
       wbp.Print
   End Sub
[/SCRIPT]
[/HEAD]
[BODY]
[INPUT TYPE="BUTTON" VALUE="Print" ONCLICK="Print()"]
[/BODY]

this comes up with 'object doesn't support this propert or method 'wbp.DefaultPrinterName''

Has anybody any ideas, it is driving me crazy and it is probably something silly!

Robert
 
It may be because not all the machines have the activex control installed, you should use a codebase="" on the object, then if it's not installed the browser will download the control so it can be used in the page. Regards

Big Dave

davidbyng@hotmail.com


** If I am wrong I am sorry, but i'm only trying to help!! **

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top