Results 1 to 9 of 9

Thread: WCF : Invoking Methods from VBA through LAN

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Location
    India
    Posts
    134

    Question WCF : Invoking Methods from VBA through LAN

    Hi All,

    I have created a WCF Service, with net.tcp binding. Now I made a call to this service from MS Word Macro Through VBA. For this After creating the WCF service using VS 2008, running of which started the default WCF hosting client.

    Then in the VBA macro, I have used the following code to connect to the service

    Code:
    Dim addr As String
    addr = "service:mexAddress=""net.tcp://192.168.1.53:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/Mex"","
    addr = addr + "address=""net.tcp://192.168.1.53:8731/Design_Time_Addresses/WcfServiceLibrary1/Service1/"","
    addr = addr + "contract=""IService1"", contractNamespace=""http://tempuri.org/"","
    addr = addr + "binding=""NetTcpBinding_IService1"", bindingNamespace=""http://tempuri.org/"""
    
    
    Dim service1 As Object
    Dim dataSrc As String
    Set service1 = GetObject(addr)
    dataSrc = service1.GetData()

    This was connecting to the service and invoking the mehtod GetData() and the dataSrc variable is holding the expected value.

    All this was done on my local machine but Now I want to deploy the WCF service on the LAN environment on a server so that all the MS Word Clients (for which I'll update the VBA macro) will be able to connect to the service. Also the MS Word clients in the network are varying not all are on MS Word 2003, some are on MS Word 2007 but I think there will be no issue with VBA macro execution

    I am not sure on how to acheive this. Any help would be appreciated.

    Thanks in Advance.
    Last edited by pavan; Feb 4th, 2010 at 08:54 AM.
    Pavan Kumar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width