1

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?

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.