R
Randy Elliott
Good Day,
I have an application running in Outlook that receives emails
from a form on a website, parses the data, stores it in an Access
database and then files each email message in a sub-folder, depending
on the subject line. In operation, I leave Outlook running at all
times and Access closed. Other individuals (Marketing people) view
and edit the data via an aspx page (IIS is running on this machine).
The entire process worked fine on a Windows 2000 machine running
Office Pro 2000, but when I moved it to a new XP Pro machine with
Office Pro 2003 (my desktop computer, used for other tasks as well -
2.8 GHz, 1 GB RAM) it no longer functioned. I solved most of the
problems with the database, IIS and the ASP.NET code to view database
contents, but the process is failing near the beginning, on the
CreateObject("Outlook.Application") line.
The problem code section follows:
-------------------------------------
Private Sub Application_NewMail()
Dim webInbox As Outlook.MAPIFolder
Dim namespace1 As NameSpace
Dim messages As Outlook.Items
Dim oneMessage As Outlook.MailItem
Dim strBody, submittedName, submittedEmail, submittedTitle, _
submittedUniversity, submittedAddress1, submittedAddress2,
submittedCity, _
[and several other variables] As String
Dim objOutlook As Outlook.Application
MsgBox ("Now have variables declared ")
Set objOutlook = CreateObject("Outlook.Application")
MsgBox ("objOutlook is set")
--------------------------
In operation, I get the first message box, click "OK" and then a
dialog box pops up with
Run-time error '-xxx(yyy7007e)':
[where xxx is an 8 to 10 digit number and yyy is 3 hex
characters]
The operation failed
At this point, clicking OK dismisses the box while clicking HELP
brings up Visual Basic Help opened to the "Automation error (Error
440)" page.
My troubleshooting so far has been
1. Substitute "Word.Application" and "Excel.Application" (both work
fine),
2. Ensuring that proper references are set (compared to those on the
Win2k box)
VBA
Outlook 11.0 Object Library
OLE Automation
MS Office 11.0 Object Library
MS Access 11.0 Object Library
MS DAO 3.6 Object Library
[and no others]
are all checked
3. Editing registry entry
[HKEY_CLASSES_ROOT\CLSID\{0006F03A-0000-0000-C000-000000000046}]
@="Microsoft Office Outlook" to change @="C:\\Program Files\\Common
Files\\Symantec Shared\\Script Blocking\\ScrBlock.dll"
[not sure how that got in there, changed it to
C:\WINNT\System32\scrrun.dll]
4. Reinstalling (fix) Office
5. Windows Update on Office
Although I don't think it matters, it may be notable that I did
change the machine name after most of the software was loaded.
I think I must be missing something really trivial here, but have
been pulling my hair out for several days. Any suggestions would be
really appreciated.
--Randy
I have an application running in Outlook that receives emails
from a form on a website, parses the data, stores it in an Access
database and then files each email message in a sub-folder, depending
on the subject line. In operation, I leave Outlook running at all
times and Access closed. Other individuals (Marketing people) view
and edit the data via an aspx page (IIS is running on this machine).
The entire process worked fine on a Windows 2000 machine running
Office Pro 2000, but when I moved it to a new XP Pro machine with
Office Pro 2003 (my desktop computer, used for other tasks as well -
2.8 GHz, 1 GB RAM) it no longer functioned. I solved most of the
problems with the database, IIS and the ASP.NET code to view database
contents, but the process is failing near the beginning, on the
CreateObject("Outlook.Application") line.
The problem code section follows:
-------------------------------------
Private Sub Application_NewMail()
Dim webInbox As Outlook.MAPIFolder
Dim namespace1 As NameSpace
Dim messages As Outlook.Items
Dim oneMessage As Outlook.MailItem
Dim strBody, submittedName, submittedEmail, submittedTitle, _
submittedUniversity, submittedAddress1, submittedAddress2,
submittedCity, _
[and several other variables] As String
Dim objOutlook As Outlook.Application
MsgBox ("Now have variables declared ")
Set objOutlook = CreateObject("Outlook.Application")
MsgBox ("objOutlook is set")
--------------------------
In operation, I get the first message box, click "OK" and then a
dialog box pops up with
Run-time error '-xxx(yyy7007e)':
[where xxx is an 8 to 10 digit number and yyy is 3 hex
characters]
The operation failed
At this point, clicking OK dismisses the box while clicking HELP
brings up Visual Basic Help opened to the "Automation error (Error
440)" page.
My troubleshooting so far has been
1. Substitute "Word.Application" and "Excel.Application" (both work
fine),
2. Ensuring that proper references are set (compared to those on the
Win2k box)
VBA
Outlook 11.0 Object Library
OLE Automation
MS Office 11.0 Object Library
MS Access 11.0 Object Library
MS DAO 3.6 Object Library
[and no others]
are all checked
3. Editing registry entry
[HKEY_CLASSES_ROOT\CLSID\{0006F03A-0000-0000-C000-000000000046}]
@="Microsoft Office Outlook" to change @="C:\\Program Files\\Common
Files\\Symantec Shared\\Script Blocking\\ScrBlock.dll"
[not sure how that got in there, changed it to
C:\WINNT\System32\scrrun.dll]
4. Reinstalling (fix) Office
5. Windows Update on Office
Although I don't think it matters, it may be notable that I did
change the machine name after most of the software was loaded.
I think I must be missing something really trivial here, but have
been pulling my hair out for several days. Any suggestions would be
really appreciated.
--Randy