WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE COM ADO CDO ADSI LDAP
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

CreateObject Remote Computer

 Keywords: CreateObject Remotely remote System Computer DCOM DCOMCNFG

Question:

I am having an issue with CreateObject. I have one for Word:
ComputerName = "remotecomputer" 
ObjWord = CreateObject("Word.Application", ComputerName)
OfficeVersion = Int(objWord.Version)
this returns the office version. I have Visio 2003 installed on the same remote computer, when I try this:
ComputerName = "remotecomputer" 
ObjVisio = ObjectCreate("Visio.Application", Computername)
I get: "Error 1727: COM: Invalid class String"
VisioVersion = Int(objVisio.Version)

Answer:

Make sure Visio.Application is registered on the remote computer. Go to the registry and see if you can locate Visio.Application in the HKEY_CLASSES_ROOT. If not then it is probable not registered. To register you many need to call regsvr32.

Also, no guarantees this will fix the problem but in order to instantiate an object on a remote computer the remoter computer's DCOM must be configured to permit it. One way to do this is to use the 'DCOMCNFG.EXE' utility which can be found in your Windows system32 directory. Since you can launch Word, you could use the utility to check the settings for Word and make sure Viso has the same settings.

More info on the the subject can be found here
http://msdn.microsoft.com/en-us/library/ms690141(VS.85).aspx


Article ID:   W18018
Filename:   CreateObject Remote Computer.txt
File Created: 2009:03:27:08:28:56
Last Updated: 2009:03:27:08:28:56