By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Error Retrieving COM object

P: n/a
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").Fol ders("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

Dec 12 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.