![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
|
Hello See if this helps: You can test this in thee following way: 1. Add a reference to Microsoft Word Object Library, look in the COM tab MSWORD8.olb Office 97 MSWORD9.olb Office 2000 MSWORD10.olb Office 2002 (XP) then you'll have "Word" in your references (Interop.Word.dll) Make sProgID = "Word.Application" sServer = "" or "YourPCName" to Instanciate a Word Server in your PC sServer="RemotePC" to instanciate a Word Server on a Remote PC Use DComCnfg.exe on the REMOTE machine to give access and launch permissions to "Word Document" object You also need to tell that the User who launchs the WinWord.exe will be the interactive user not the caller. This is in DComCnfg.exe, also. Or otherwise give permissions to the caller user. Now you only need to run a test, like this ' Local call dim rw as Word.Application rw = CType(ZCreateObject("Word.Application", ""), gettype(Word.Application)) rw.Visible = TRUE ' Remote call rw = CType(ZCreateObject ("Word.Application", "RemotePCName"), gettype (Word.Application)) rw.Visible = TRUE ' Create Object and Get error Public Function ZCreateObject(ByVal sProgID As String, ByVal sServer As String) As Object Try ' Call the VB runtime CreateObject function If IsStrNull(sServer) Then ' Local ZCreateObject = CreateObject(sProgID) Else ' Remote ZCreateObject = CreateObject(sProgID, sServer) End If Catch e As Exception ' return the error with the name of the object 'that could not be created RaiseExcep("CreateObject Wrapper ProgId: '" & sProgID & "' Machine: " & sServer & _ vbCrLf & vbCrLf & e.Message, e) End Try End Function LS -----Original Message----- Hi NG, I have a quite simple question for you. What is the easiest way to connect to a COM+ object on a remote machine. Accessing the object on a local system is no problem, by adding a reference, but how can I tell the app to look for the object not on the local, but on the remote machine. Is there a special setting that has to be made in the applications ..conf-file? Thanks, Bernd . |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |