Rob Sedgwick
Rob Sedgwick

Reputation: 4514

Create COM object

I want to test creating a COM object. Normally I use Excel or Word VBA and add a reference to the DLL I want to test. However I am on a Windows 2008 server without these programs and only the basic software installed that comes with Windows, plus IIS. How can I create a COM object easily and call its properties and methods?

Upvotes: 1

Views: 79

Answers (1)

wmz
wmz

Reputation: 3685

You could use Powershell.

For example, this creates new Word App com object:
$word = new-object -com Word.Application

If you use PS 3+ ISE, it also includes handy Intellisense: enter image description here

Full reference here: https://technet.microsoft.com/en-us/library/Hh849885.aspx
And usage here: https://technet.microsoft.com/en-us/%5Clibrary/Dd347574.aspx

Upvotes: 3

Related Questions