Error Retrieving COM object

K

Klaki

I'm trying to create an instance of Outlook using VB.net and every time
I run the site, I get the following error: Retrieving the COM class
factory for component with CLSID {0006F03A-0000-0000-C000-000000000046}
failed due to the following error: 80010001. If I run debug on my PC
using Visual Sturdio 2005, it works, but when I publish it to the web
server, I get the error. I have Office installed on the web server
with the Interop files. Is there something else that I'm missing.
Here is the code if anyone is interested:

Dim taskBody As String
Dim oOutlook As Outlook.Application
Dim oNS As Outlook.NameSpace
Dim oItem As Outlook.TaskItem
Dim oItem2 As Outlook.TaskItem

oOutlook = New Outlook.Application
oNS = oOutlook.GetNamespace("MAPI")
oItem = oNS.Folders.Item("Public Folders").Folders("All Public
Folders").Folders("My Folder").Folders("SubF").Items.Add(3)
oItem2 = oNS.Folders.Item("Public Folders").Folders("All Public
Folders").Folders("MyFolder").Folders("SubF2").Folders("SubF3").Items.Add(3)
taskBody = strBody

With oItem
.StartDate = Now
.DueDate = Now
.Owner = "Me"
.Subject = "My Subject"
.Body = taskBody
.Importance = 2
.ReminderSet = False
.Close(0)
End With

With oItem2
.StartDate = Now
.DueDate = Now
.Owner = "Me"
.Subject = "My Subject"
.Body = taskBody
.Importance = 2
.ReminderSet = False
.Close(0)
End With

Any ideas or clues would be greatly appreciated

Thanks in advance,
Klaki
 

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

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top