Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Adding a reference to a .asmx Web service to a VBA project

I am doing a project in VBA. I want to add the .asmx Web service created in .NET to my Office Word 2000 VBA Application. The asmx Web service is in my virtual directory. I have already installed the Web Service Reference Toolkit in my System. However, it allows me to add only WSDL and VSDISCO files in my project as a class module but not an asmx file. How can I add a reference to the Web service in my current VBA Project?
When you add a reference to a Web service using the toolkit it will generate a local proxy class that wraps the functionality necessary to invoke the service you reference. Using the toolkit interface, you can add a reference to the .asmx file, and .NET will automatically generate a WSDL contract for the service. For example, if you type the URL to the .asmx in the browser, with a "wsdl" query string as follows:


You'll see the service WSDL contract. You can save this WSDL contract to a file and make it available as a file from your Web site:


and either syntax will work from the Web Services Reference Tool, Web Service URL section. This is also documented at the following MSDN link:

Dig Deeper on Topics Archive

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.