createobject

Failure to set FSO = CreateObject with ExceltoWord! Add-in

心已入冬 提交于 2021-01-29 05:04:34
问题 I'm using the Excel Add-in ExceltoWord to auto-populate a Word Document from an Excel worksheet. I've followed the instructions from the original developer here. I'm using the "I created generic bookmark indicators, in Word" and "I put bookmark indicators directly in cells - Left" options with "Delete the Word doc" at the end. When I save settings I get an MS Visual Basic error Run-time error '429:' ActiveX component can't create object. I've tried switching different formats of Excel sheet

Call non-default constructor of COM class

我是研究僧i 提交于 2021-01-27 07:59:07
问题 I have a DLL (written in C#) containing a class with 2 Constructors; a default (no arguments) constructor, and another one with 3 arguments. In VBscript, I want to call the second constructor, but CreateObject only receives a classValue parameter, no possible arguments parameters. I guess the underlying implementation of CreateObject uses the system's CoCreateObject function, which according to this answer does not support arguments, but on the other hand there's QTP/UFT's DotNetFactory that

Call non-default constructor of COM class

。_饼干妹妹 提交于 2021-01-27 07:53:22
问题 I have a DLL (written in C#) containing a class with 2 Constructors; a default (no arguments) constructor, and another one with 3 arguments. In VBscript, I want to call the second constructor, but CreateObject only receives a classValue parameter, no possible arguments parameters. I guess the underlying implementation of CreateObject uses the system's CoCreateObject function, which according to this answer does not support arguments, but on the other hand there's QTP/UFT's DotNetFactory that

What is the difference between creating a COM instance through CreateObject versus ActiveXObject?

女生的网名这么多〃 提交于 2021-01-27 06:31:39
问题 This has been touched on here in the second answer but I don't see how it answers the question (nor does the link provided). What can ActiveXObject do that CreateObject cannot, and vice-versa? 来源: https://stackoverflow.com/questions/7932771/what-is-the-difference-between-creating-a-com-instance-through-createobject-vers

Check if folder is there, if not create it on current user logged in VBS

痴心易碎 提交于 2020-01-31 07:03:04
问题 Currently this is my script Set oWS = WScript.CreateObject("WScript.Shell") ' Get the %userprofile% in a variable, or else it won't be recognized userProfile = oWS.ExpandEnvironmentStrings( "%userprofile%" ) What I am trying to do is grab the current user logged in, I want it to check the directory D:\"personsuser"\Appdata\Roaming\Local to see if the folder "Local" is created, if it isn't created I want to create one via createobject in vbs. The script above from what i know grabs the current

InternetExplorer.Application com object and windows 2012 in powershell

帅比萌擦擦* 提交于 2020-01-05 12:54:14
问题 I am trying to access the document of an internet explorer com object with windows 2012. The code works great in windows 2008 but as soon as I try to run it on windows 2012 (fresh install, tried on more than one server), the same code stops working. In other words, $ie.document.documentHtml returns as null. Below is the code: $ie = new-object -com "InternetExplorer.Application" $ie.navigate2("http://www.example.com/") while($ie.busy) {start-sleep 1} $ie.document.documentHtml.innerhtml Has the

InternetExplorer.Application com object and windows 2012 in powershell

喜欢而已 提交于 2020-01-05 12:54:10
问题 I am trying to access the document of an internet explorer com object with windows 2012. The code works great in windows 2008 but as soon as I try to run it on windows 2012 (fresh install, tried on more than one server), the same code stops working. In other words, $ie.document.documentHtml returns as null. Below is the code: $ie = new-object -com "InternetExplorer.Application" $ie.navigate2("http://www.example.com/") while($ie.busy) {start-sleep 1} $ie.document.documentHtml.innerhtml Has the

Why doesn't code work in VB.net, but works in VBA; GetObject

故事扮演 提交于 2019-12-31 03:24:06
问题 VBA code works great: Sub testVBA() Dim wb As Object ' Lotus123.Document Set wb = GetObject("S:\Temp\T\0375D.WK3", "Lotus123.Workbook") End Sub VB.net code fails: Sub TestVBNet() Dim wb As Object ' Lotus123.Document wb = GetObject("S:\Temp\T\0375D.WK3", "Lotus123.Workbook") End Sub In VB.net I get a FileNotFoundException: "File name or class name not found during Automation operation." As I can run it from VBA that means the file exists and that the class name exists. So why doesn't it work

Create object WMPlayer.OCX issue

南笙酒味 提交于 2019-12-25 01:14:05
问题 I am using following code in my HTML page but it is returning NULL. (IE8 , MS WIndows 7 Pro) Set Sound = CreateObject("WMPlayer.OCX") I am sure Windows Media Player is installed and working fine. How to fix it? 回答1: It seems like is impossible to use Visual Basic code like I use in HTML. Instead of it we have to use Windows Media Player in DOM like this <body onload='' scroll="no"> <object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer" width="0" height="0"> <