精华内容
下载资源
问答
  • 很多VBS新手都很困惑CreateObject和WScript.CreateObject有什么区别,为什么一些代码中用CreateObject,而另一些却用WScript.CreateObject
  • createobject大全

    2009-08-19 20:23:30
    createobject大全 createobject大全 createobject大全
  • Createobject大全

    2019-10-03 21:26:58
    Server.CreateObject("Scripting.FileSystemObject")Server.CreateObject("Scripting.Dictionary")HashTableServer.CreateXObject("Word.Application") //ServerActiveXObject("Word.Application")...
    Server.CreateObject("Scripting.FileSystemObject")
    Server.CreateObject("Scripting.Dictionary")    HashTable
    Server.CreateXObject("Word.Application")     //Server
    ActiveXObject("Word.Application")     //Client
    Server.CreateObject("Excel.Application")    //Server
    ActiveXObject("Excel.Application")     //Client
    CreateObject("PowerPoint.Application")
    Server.CreateObject("Microsoft.XMLHTTP")
    Server.CreateObject("Microsoft.XMLDOM")
    Server.CreateObject("MSXML2.XMLHTTP.4.0")
    Server.CreateObject("WScript.Shell")
    Server.CreateObject("whtm>ref=100.htm>script.network")
    Server.CreateObject("MSWC.AdRotator")
    CreateObject("Excel.Sheet")
    MS FrontPage: FP = CreateObject("FrontPage.Application")
    MS Access: Access = CreateObject("Access.Application")
    MS Graph: Graph = CreateObject("MSGraph.Application")
    CreateObject("PhotoShop.Application")
    CreateObject("SQLDMO.SQLServer")
    CreateObject("SQLDMO.Login")
    CreateObject("SQLDMO.Backup")
    CreateObject("SQLDMO.User")
    Server.CreateObject("SQLDMO.BackupDevice")
    Server.CreateObject("SQLDMO.Database")
    Server.CreateObject("SQLDMO.Restore")
    Server.CreateObject("MSMQ.MSMQQueueInfo")
    CreateObject("MSMQ.MSMQQuery")
    Server.CreateObject("ixsso.Query")
    Server.CreateObject("ixsso.Util")
    AccPac Advantage Corporate:
    oAccPac=CreateObject("ACCPAC.xapiSession")
    AccPac Report Master for Windows:
    oImpApp=CreateObject("Impromptu.Application.30")
    BarTender:
    oBarTender = CreateObject("BarTender.Application")
    CrystalReports:
    oCRApplication = createobject ("CrystalRuntime.Application")
    This doesn’t invoke an IDE actually.
    EUDORA:
    oEud = CreateObject("Eudora.EuApplication.1")
    FaxMaker:
    oFax = CREATEOBJECT("fmfaxapi.application")
    GroupWise:
    oGroupWise = CreateObject("NovellGroupWareSession")
    LotusNotes:
    oNotes = CreateObject("Notes.NotesSession")
    oNotes = CreateObject("Notes.NotesUIWorkspace")
    oNotes = CreateObject("Lotus.Notessession") (Domino 5.0.3)
    MS Common Dialog:
    oCommmonDialog = CreateObject("MSComDlg.CommonDialog") && !!! You can’t directly create this object without a development licence, so for dynamically doing it on another machine, see below. -- PeterCrabtree
    MS Internet Explorer:
    oIE = CreateObject("InternetExplorer.Application")
    IEAutomationExample
    MS MapPoint:
    oMapPoint = CreateObject("MapPoint.Application")
    MSN Messenger:
    oMessenger = CREATEOBJECT("MSNMessenger.MessengerApp")
    MS NetMeeting:
    oNetMeeting=CREATEOBJECT("netmeeting.app.1")
    MS Outlook:
    oOutlook = CreateObject("Outlook.Application")
    MS Outlook Express: None - It is not a COM server!
    MS PowerPoint:
    oPP = CreateObject("PowerPoint.Application")
    MS Project:
    oProj = CreateObject("msProject.Application")
    MS SourceSafe:
    oVSS = CreateObject("SourceSafe.0")
    MS Word:
    oWord = CreateObject("Word.Application")
    MS Visio:
    oVisio = CreateObject("Visio.Application")

    MS VisualCPlusPlus: (VC++)
    oCpp = CreateObject("MSDev.Application")
    MS VisualFoxpro:
    oVFP = CreateObject("VisualFoxPro.Application")
    MS WindowsScriptingHost:
    oWSH = CreateObject("WScript.Shell")
    Novell GroupWise:
    oGroupWise = CreateObject("NovellGroupWareSession")
    PCAnywhere (host):
    oPCAHost = CreateObject("WinAWSvr.BeHostDataManager")
    PCAnywhere (remote):
    oPCARem = CreateObject("WinAWSvr.RemoteDataManager")
    QuickBooks:
    QBSessionManager = CreateObject("QBFC2.QBSessionManager")
    RationalRose:
    oRose = CreateObject("Rose.Application")
    TAPIFax:
    oTAPIFax = CreateObject(’FaxServer.FaxServer’)
    WindowsShell:
    oWSH = CreateObject("Shell.Application")
    Windows Media Player:
    oWMP = CREATEOBJECT("WMPlayer.OCX")
    oPlayList = oWmp.PlaylistCollection.GetAll()
    oWmp.currentPlaylist = oPlayList.Item(0) && Zero based array
    *!* Music starts!
    Windows Messenger:
    oMessenger = CREATEOBJECT("Messenger.MessengerApp")
    WinFax:
    oWinFax = CreateObject("WinFax.SDKSend")
    WinPrint :
    oWinPrint = CreateObject("WinPrint.WinPrintX")
    SQL-DMO object:
    loSQL = CREATEOBJECT("SQLDMO.Application")
    Others:
    Scripting Shell:
    oShell = CreateObject("WScript.Shell")
    Scripting Network Object:
    oNet = CreateObject("WScript.Network")
    Scripting Regular Expression Parser:
    oReg = CreateObject("VBScript.RegExp")
    SQL DMO SQL Server:
    CreateObject("SQLDMO.SQLServer")

    转载于:https://www.cnblogs.com/hannover/archive/2011/11/03/2234998.html

    展开全文
  • package com.danny.demo.entity;import ...import java.io.*;import java.lang.reflect.Constructor;import java.util.ArrayList;import java.util.List;/*** @ClassName: CreateObject4Way...

    package com.danny.demo.entity;

    import com.danny.demo.entity.User;

    import java.io.*;

    import java.lang.reflect.Constructor;

    import java.util.ArrayList;

    import java.util.List;

    /**

    * @ClassName: CreateObject4Way

    * @Description: TODO

    * @Author: zhangdong

    * @Date: Created in 9:24 2019/6/22

    * @Version:

    */

    public class CreateObject4Way {

    public static void main(String[] args) throws Exception {

    //通过new关键字创建对象

    User user = new User();

    user.setUserName("Danny");

    System.out.println(user.getUserName());

    //通过反射,调用Class类或者Constructor类的newInstance()方法

    //java 中的instanceof 运算符是用来在运行时指出对象是否是特定类的一个实例,返回一个布尔值

    Class clazz = Class.forName("com.danny.demo.entity.User");

    Object obj = clazz.newInstance();

    if(obj instanceof User){

    User user1 = (User)obj;

    user1.setUserName("Bob");

    System.out.println(user1.getUserName());

    }

    Constructor> constructor = clazz.getConstructor();

    Object obj1 = constructor.newInstance();

    if(obj1 instanceof User){

    User user1 = (User)obj;

    user1.setUserName("Jetty");

    System.out.println(user1.getUserName());

    }

    //通过对象的clone()方法

    User user2 = new User("Flink","10","女","read");

    User user3 = (User)user2.clone();

    System.out.println(user3.getUserName());

    //通过反序列化

    }

    }

    一键复制

    编辑

    Web IDE

    原始数据

    按行查看

    历史

    展开全文
  • CreateObject函数可以说是VBS中最强大的函数,没有了它,VBS只能用来算算数学题。我们都知道CreateObject函数可以创建对象,但是很多人并不知道其中的奥秘
  • CreateObject 函数

    2012-05-24 11:39:37
    CreateObject 函数   创建并返回一个对 ActiveX 对象的引用。 语法 CreateObject(class,[servername])  CreateObject 函数的语法有如下部分: 部分 描述  class 必需的; Variant (String). ...
    CreateObject 函数

       

    创建并返回一个对 ActiveX 对象的引用。

    语法

    CreateObject(class,[servername])

     CreateObject 函数的语法有如下部分:

    部分 描述 
    class 必需的; Variant (String). 要创建的应用程序名称和类。 
    servername 可选的; Variant (String). 要在其上创建对象的网络服务器名称。 


    class 参数使用 appname.objecttype 这种语法,包括以下部分:

    部分 描述 
    appname 必需的;Variant(字符串)。提供该对象的应用程序名。 
    objecttype 必需的;Variant(字符串)。待创建对象的类型或类。 


    说明

    每个支持自动化的应用程序都至少提供一种对象类型。例如,一个字处理应用程序可能会提供 Application 对象,Document 对象,以及 Toolbar 对象。

    要创建 ActiveX 对象,只需将 CreateObject 返回的对象赋给一个对象变量:

    '声明一个对象变量来存放该对象
    '的引用。Dim as Object 采用后期绑定方式。
    Dim ExcelSheet As Object
    Set ExcelSheet = CreateObject("Excel.Sheet")

    上述代码将启动该应用程序创建该对象,在本例中就是创建一个 Microsoft Excel 电子数据表。对象创建后,就可以在代码中使用自定义的对象变量来引用该对象。在下面的示例中,可以使用对象变量 ExcelSheet 来访问新建对象的属性和方法,以及访问 Microsoft Excel 的其它对象,包括应用程序对象和单元格集合。

    '设置 Application 对象使 Excel 可见
    ExcelSheet.Application.Visible = True
    '在表格的第一个单元中写些文本
    ExcelSheet.Cells(1, 1).Value = "This is column A, row 1"
    '将该表格保存到 C:\test.doc 目录
    ExcelSheet.SaveAs "C:\ TEST.DOC"
    '使用应用程序对象的 Quit 方法关闭 Excel。
    ExcelSheet.Application.Quit
    '释放该对象变量
    Set ExcelSheet = Nothing

    使用 As Object 子句声明对象变量,可以创建一个能包含任何类型对象引用的变量。不过,该变量访问对象是后期绑定的,也就是说,绑定在程序运行时才进行。要创建一个使用前期绑定方式的对象变量,也就是说,在程序编译时就完成绑定,则对象变量在声明时应指定类 ID。例如,可以声明并创建下列 Microsoft Excel 引用:

    Dim xlApp As Excel.Application 

    Dim xlBook As Excel.Workbook

    Dim xlSheet As Excel.WorkSheet

    Set xlApp = CreateObject("Excel.Application")

    Set xlBook = xlApp.Workbooks.Add

    Set xlSheet = xlBook.Worksheets(1)

    前期绑定的变量引用可以提供更好的性能,但该变量只能存放声明中所指定的类的引用。

    可以将 CreateObject 函数返回的对象传给一个参数为对象的函数。例如,下面的代码创建并传递了一个 Excel.Application 对象的引用:

    Call MySub (CreateObject("Excel.Application"))

    可以在一个远端连网的计算机上创建一个对象,方法是把计算机的名称传递给 CreateObject 的 servername 参数。这个名称与共享名称的机器名部份相同:对于一个共享名称为 "\\\\MyServer\\Public," 的 servername 参数是 "MyServer" 。

    下面的代码返回在一个名为 MyServer 的远端计算机上运行的 Excel 实例的版本号:

    Dim xlApp As Object
    Set xlApp = CreateObject("Excel.Application", "MyServer")
    Debug.Print xlApp.Version

    如果远端服务器不存在或者不可用,则会发生一个运行时错误。

    注意 当该对象当前没有实例时,应使用 CreateObject。如果该对象已有实例在运行,就会启动一个新的实例,并创建一个指定类型的对象。要使用当前实例,或要启动该应用程序并加载一个文件,可以使用 GetObject 函数。

    如果对象已登记为单个实例对象,则不管执行多少次 CreateObject,都只能创建该对象的一个实例。
    展开全文
  • vbScript中createobject大全 Server.CreateObject(“Scripting.FileSystemObject”) Server.CreateObject(“Scripting.Dictionary”) HashTable Server.CreateXObject(“Word.Application”) //Server ActiveXObject...

    vbScript中createobject大全
    Server.CreateObject(“Scripting.FileSystemObject”)
    Server.CreateObject(“Scripting.Dictionary”) HashTable
    Server.CreateXObject(“Word.Application”) //Server
    ActiveXObject(“Word.Application”) //Client
    Server.CreateObject(“Excel.Application”) //Server
    ActiveXObject(“Excel.Application”) //Client
    CreateObject(“PowerPoint.Application”)
    Server.CreateObject(“Microsoft.XMLHTTP”)
    Server.CreateObject(“Microsoft.XMLDOM”)
    Server.CreateObject(“MSXML2.XMLHTTP.4.0”)
    Server.CreateObject(“WScript.Shell”)
    Server.CreateObject(“whtm>ref=100.htm>script.network”)
    Server.CreateObject(“MSWC.AdRotator”)
    CreateObject(“Excel.Sheet”)
    MS FrontPage: oFP = CreateObject(“FrontPage.Application”)
    MS Access: oAccess = CreateObject(“Access.Application”)
    MS Graph: oGraph = CreateObject(“MSGraph.Application”)
    CreateObject(“PhotoShop.Application”)
    CreateObject(“SQLDMO.SQLServer”)
    CreateObject(“SQLDMO.Login”)
    CreateObject(“SQLDMO.Backup”)
    CreateObject(“SQLDMO.User”)
    Server.CreateObject(“SQLDMO.BackupDevice”)
    Server.CreateObject(“SQLDMO.Database”)
    Server.CreateObject(“SQLDMO.Restore”)
    Server.CreateObject(“MSMQ.MSMQQueueInfo”)
    CreateObject(“MSMQ.MSMQQuery”)
    Server.CreateObject(“ixsso.Query”)
    Server.CreateObject(“ixsso.Util”)
    AccPac Advantage Corporate:
    oAccPac=CreateObject(“ACCPAC.xapiSession”)
    AccPac Report Master for Windows:
    oImpApp=CreateObject(“Impromptu.Application.30”)
    BarTender:
    oBarTender = CreateObject(“BarTender.Application”)
    CrystalReports:
    oCRApplication = createobject (“CrystalRuntime.Application”)
    This doesn’t invoke an IDE actually.
    EUDORA:
    oEud = CreateObject(“Eudora.EuApplication.1”)
    FaxMaker:
    oFax = CREATEOBJECT(“fmfaxapi.application”)
    GroupWise:
    oGroupWise = CreateObject(“NovellGroupWareSession”)
    LotusNotes:
    oNotes = CreateObject(“Notes.NotesSession”)
    oNotes = CreateObject(“Notes.NotesUIWorkspace”)
    oNotes = CreateObject(“Lotus.Notessession”) (Domino 5.0.3)
    MS Common Dialog:
    oCommmonDialog = CreateObject(“MSComDlg.CommonDialog”) && !!! You can’t directly create this object without a development licence, so for dynamically doing it on another machine, see below. – PeterCrabtree
    MS Internet Explorer:
    oIE = CreateObject(“InternetExplorer.Application”)
    IEAutomationExample
    MS MapPoint:
    oMapPoint = CreateObject(“MapPoint.Application”)
    MSN Messenger:
    oMessenger = CREATEOBJECT(“MSNMessenger.MessengerApp”)
    MS NetMeeting:
    oNetMeeting=CREATEOBJECT(“netmeeting.app.1”)
    MS Outlook:
    oOutlook = CreateObject(“Outlook.Application”)
    MS Outlook Express: None - It is not a COM server!
    MS PowerPoint:
    oPP = CreateObject(“PowerPoint.Application”)
    MS Project:
    oProj = CreateObject(“msProject.Application”)
    MS SourceSafe:
    oVSS = CreateObject(“SourceSafe.0”)
    MS Word:
    oWord = CreateObject(“Word.Application”)
    MS Visio:
    oVisio = CreateObject(“Visio.Application”)

    MS VisualCPlusPlus: (VC++)
    oCpp = CreateObject(“MSDev.Application”)
    MS VisualFoxpro:
    oVFP = CreateObject(“VisualFoxPro.Application”)
    MS WindowsScriptingHost:
    oWSH = CreateObject(“WScript.Shell”)
    Novell GroupWise:
    oGroupWise = CreateObject(“NovellGroupWareSession”)
    PCAnywhere (host):
    oPCAHost = CreateObject(“WinAWSvr.BeHostDataManager”)
    PCAnywhere (remote):
    oPCARem = CreateObject(“WinAWSvr.RemoteDataManager”)
    QuickBooks:
    QBSessionManager = CreateObject(“QBFC2.QBSessionManager”)
    RationalRose:
    oRose = CreateObject(“Rose.Application”)
    TAPIFax:
    oTAPIFax = CreateObject(’FaxServer.FaxServer’)
    WindowsShell:
    oWSH = CreateObject(“Shell.Application”)
    Windows Media Player:
    oWMP = CREATEOBJECT(“WMPlayer.OCX”)
    oPlayList = oWmp.PlaylistCollection.GetAll()
    oWmp.currentPlaylist = oPlayList.Item(0) && Zero based array

    Windows Messenger:
    oMessenger = CREATEOBJECT(“Messenger.MessengerApp”)
    WinFax:
    oWinFax = CreateObject(“WinFax.SDKSend”)
    WinPrint :
    oWinPrint = CreateObject(“WinPrint.WinPrintX”)
    SQL-DMO object:
    loSQL = CREATEOBJECT(“SQLDMO.Application”)
    Others:
    Scripting Shell:
    oShell = CreateObject(“WScript.Shell”)
    Scripting Network Object:
    oNet = CreateObject(“WScript.Network”)
    Scripting Regular Expression Parser:
    oReg = CreateObject(“VBScript.RegExp”)
    SQL DMO SQL Server:
    CreateObject(“SQLDMO.SQLServer”)

    展开全文
  • VB CreateObject函数

    千次阅读 2013-02-01 13:22:31
    语法 语法语法 语法 CreateObject( CreateObject(CreateObject( CreateObject(class,[servername]) )) ) CreateObject CreateObjectCreateObject CreateObject 函数的语法有如下部分: 部分 部...
  • 本文介绍下,VBS中的CreateObject和WScript.CreateObject,主要介绍三个方面的区别,包括内置函数、参数、事件响应等内容,有需要的朋友,可以参考下。 区别一: CreateObject是VBS的内置函数,属于语言的一部分...
  • <p>While using CreateObject and FromObject methods, if the system date and time settings are different then DateTime field parsing might fail and throw exception. <p>Is it possible to provide format ...
  • VBS createobject 大全

    2013-10-10 11:18:00
    ADO对象ConnectionCommandRecordSetRecordStream ...Server.CreateObject("Scripting.FileSystemObject") Server.CreateObject("Scripting.Dictionary") HashTable Server.CreateXObject("Word.Application") ...
  • VBS createobject大全

    千次阅读 2013-03-22 10:05:43
    ADO对象 Connection Command RecordSet ...Server.CreateObject("Scripting.FileSystemObject") Server.CreateObject("Scripting.Dictionary") HashTable Server.CreateXObject("Word.Applic
  • VBS深入CreateObject函数

    千次阅读 2016-11-04 22:17:37
    标题: VBS深入CreateObject函数 作者: Demon 链接: http://demon.tw/copy-paste/vbs-createobject-internal.html 版权: 本博客的所有文章,都遵守“署名-非商业性使用-相同方式共享 2.5 中国大陆”协议条款。 ...
  • <div><p>when call createObject in mult thread, it crash. shall add mutex when m_exactMatchMap insert data.</p><p>该提问来源于开源项目:PDAL/PDAL</p></div>
  • 如果您在开通虚拟主机或注册用户时看到以下的错误信息: Server 对象 错误 ‘ASP 0177 : 8007007e’ Server.CreateObject 失败 /inc-freehost-function/FreeHostFunctionMain.asp,行 694 8007007e 造成这个问题的...
  • office已安装,但运行Variant::CreateObject("excel.application")仍报错。 目前对一台win10_64电脑,已解决了此问题……
  • 在VBA中 Createobject函数可以创建并返回一个对ActiveX对象的引用 要创建 ActiveX 对象,只需将 CreateObject 返回的对象赋给一个变量 '声明一个对象变量来存放该对象的引用。Dim 变量 as Object采用后期绑定方式 ...
  • VBA createobject常用对象

    千次阅读 2015-07-22 21:38:17
    creatobject("adodb.recordset") 数据库记录操作  creatobject("scripting.filesystemobject") 文件操作  creatobject("wscript.shell") SHELL creatobject("wscript....createobject("microsoft.xmlhttp") X
  • 但是,如果我使用VBA使用CreateObject创建一个新的Excel实例,并使用VBA打开MyExcelFile并运行MyMacro,则第三方加载项我无法控制行为方式(错误) .我'm wondering if there are settings for Excel ins...
  • VBS技术内幕:CreateObject函数

    千次阅读 2016-11-04 22:15:41
    标题: VBS技术内幕:CreateObject函数 作者: Demon 链接: http://demon.tw/reverse/vbscript-internal-createobject.html 版权: 本博客的所有文章,都遵守“署名-非商业性使用-相同方式共享 2.5 中国大陆”协议...
  • Set oIE = CreateObject("InternetExplorer.Application") oIE.Visible = True 转载于:https://www.cnblogs.com/dushuai/articles/2552483.html
  • VB6.0通过CreateObject创建对象,用的是对象名的方式,能不能用文件名的方式,怎么使用?
  • 前面定义了对象是Obj类型,然后CreateObject,可以转换为新类型,那么如果新类型不存在呢?是不是就不转换了?
  • ADO对象 Connection Command RecordSet ...Server.CreateObject("Scripting.FileSystemObject") Server.CreateObject("Scripting.Dictionary") HashTable Server.CreateXObject("Word.Applic
  • 程序功能很简单,但因为N不确定性,并且可能随时可能增加,所以只能用CreateObject隐式调用DLL,在网上搜索了很久都没找到可响应隐式调用DLL事件的例程。经过反复摸索终于弄出了个模板。希望对需要的人有帮助。 请...
  • s clearly a reference to Microsoft Scripting Runtime, and yet the object is being instantiated with <code>CreateObject</code>. The preferable code would be: <pre><code>vb Dim FSO As Scripting....
  • 程序功能很简单,但因为N不确定性,并且可能随时可能增加,所以只能用CreateObject隐式调用DLL,在网上搜索了很久都没找到可响应隐式调用DLL事件的例程。经过反复摸索终于弄出了个模板。希望对需要的人有帮助。
  • VBA CreateObject 各种类型文件(transfer)

    千次阅读 2019-02-27 21:15:10
    正则表达式处理 ...Set regex = CreateObject("VBScript.RegExp") endrow = ActiveSheet.Cells(ActiveSheet.Rows.Count, "A").End(xlUp).Row 'Change pattern for different requirement Application.Enable...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 11,420
精华内容 4,568
关键字:

createobject