FAQ Database Discussion Community


Combined class and interface type

typescript,activexobject
In Javascript (under WScript or HTA), I would write the following pattern: var fso = new ActiveXObject('Scripting.FileSystemObject'); var ext = fso.GetExtensionName('C:\test.txt'); //returns 'txt' var badResult = fso.NonExistentMethod(); //raises a runtime error Using TypeScript, I can declare an interface which will prevent this sort of error: module Scripting { export interface...

Reading file in PERL using ActiveX

javascript,html,perl,cgi,activexobject
I have been trying to read a file in PERL using ActiveX Control. I was successful in reading the file using ActiveX Controls in HTML. So I changed the HTML code to PERL cgi using "Print" Statement. After that I am not able to read the file the file using...

What's going on? OpenTextFile.WriteLine error:- Object doesn't support property or method 'WriteLine'

javascript,activexobject,filesystemobject
Need some advice please peep's... 11 <script> 12 fname='C:/Genesis 15/site/portal/proj/htm_app/pkmn/test_2.txt' 13 mode=8 // Open a file for reading 14 create=true // a new file will not be created 15 16 xfs=new ActiveXObject('Scripting.FileSystemObject') 17 xfs.OpenTextFile(fname,mode,create) 18 xfs.WriteLine('This text will be added to the end of file') 19 xfs.Close() 20 </script> returns:-...

A private subroutine in VBA is being activated by other workbooks — Why?

excel,vba,excel-vba,excel-2010,activexobject
I have a private subroutine in Workbook A that is running any time I open or close and save other unrelated workbooks. I'm trying to understand why that occurs so I can capture all potential errors that may occur. The subroutine is an ActiveX ComboBox named TabProg that is supposed...

Embed webbrowser control inside IE

internet-explorer,webbrowser-control,activexobject
How can I create a web browser activeX object inside a HTML document that is being opened with IE? I have tried something like this, but the object did not display: <object id="mini" width=300 height=300 classid="CLSID_WebBrowser"</object> ... ...

Change ActiveX email font

email,outlook,activex,activexobject
Would anyone know how to change the font in an email generated by new ActiveXObject("Outlook.Application")? This seems to default to Times New Roman regardless of the default settings in the mail client. Thanks...

Can't get last errors from COM Object in C#

c#,activexobject,comobject
My C# code: bvt = Activator.CreateInstance(Type.GetTypeFromProgID("xxx.BVT")); // calling a function that terminates with an error bvt.GiveMeAnError(); var msg = ""; long number = 0L; bvt.GetLastError(number, msg); result = "Errornumber:"+ number + " Errormessage:"+ msg; The result is: "Errornumber:0 Errormessage:" My problem is the function GetLastError(). Number and msg should contain...