Using VBScript ActiveX Control in VB-Application 
Author Message
 Using VBScript ActiveX Control in VB-Application

Im very frustrated, because i dont know about the resolution for Problem
:-(

I make it so.

This Code is in VB:
NewFrmMain.VBScripting.AddObject "objPrint", Printer, True

and this in VBS:
Sub PrintHeader ()
Dim strText
objPrint.Orientation = vbPRORPortrait
With objPrint
    strText = "Sample Text"
    .FontName = "Arial"
    .FontSize = 13
    .FontBold = True
    .CurrentX = 400
    .CurrentY = 600
End With

objPrint.Print strText --> 'Err.Number = 438, Object doesnt support this
property or Method'
objPrint.EndDoc

the Rest of code is OK

Thank you, for your help

Quote:
----- Original Message -----

Newsgroups: microsoft.public.scripting.vbscript
Sent: Sunday, September 10, 2000 12:18 AM
Subject: Re: Using VBScript ActiveX Control in VB-Application

> Are you assuming that the VB Printer object will automatically be visible
to
> VBScript executing within the ScriptControl?   You need to expose it via
the
> ScriptControl's AddObject method...

> --
> Michael Harris
> Microsoft.MVP.Scripting
> --



> > Hey Specialists

> > i would like print to windows-standard-printer over vb-script Control
1.0,
> > which is included in my VB6 Application.
> > The initialization is ok, unfortunately the command Printer.Print
"Sample
> > Text" do not work.

> > Thank You

> > Mike



Sun, 02 Mar 2003 01:00:25 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Using VBScript ActiveX Control in VB-Application

2. Print via VB-Script ActiveX-Control in VB-Application

3. Using ActiveX Marquee control in a non-html VB application

4. trying to populate treeview control in activex using vb script

5. Repost: Problems working with a MSChart ActiveX control using VBScript

6. Using ActiveX control from VBScript

7. Event logging for VB application using VBScript

8. Using VBScript to find ActiveX Control CLS_ID

9. How can I link ActiveX control(TreeView) and DataBase Using VBScript

10. using VBScript to access a function in an activex control

11. Repost: Problems working with the MSChart ActiveX control using VBScript

12. Problems working with a MSChart ActiveX control using VBScript - Please help

 

 
Powered by phpBB® Forum Software