Microsoft.Office.Interop not defined



My code works as a VB.NET executable file. So I'm trying to "adapt" it to a
..NET XML Web Service. As a VB.NET file, I used Microsoft.Office.Core as the
reference, and everything was fine, but when I try to do the same thing as an
XML Web Service, VS.NET says my syntax is not defined.

Can anyone tell me why the syntax is not defined?

<WebMethod()> _
Public Function HelloWorld() As String
Dim app As Microsoft.Office.Interop.Outlook.Application
Dim appt As Microsoft.Office.Interop.Outlook.AppointmentItem
app = New Microsoft.Office.Interop.Outlook.Application
appt =
appt.Subject = "Subject of this meeting"
MsgBox("Your appointment has been successfully scheduled.")
Catch ex As Exception
MsgBox("There was a problem, the error is: " & ex.ToString())
End Try
End Function


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question