![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I am trying to send an email with an attachment from Access 2007. I ran into
problems with getObject and createObject. The object is "Nothing" even if Outlook is open. To try and isolate the problem, I created a new database to do some testing with the following module Sub test() Dim objApp As Object Dim blnOutlookInitiallyOpen As Boolean On Error Resume Next blnOutlookInitiallyOpen = True Set objApp = GetObject(, "Outlook.Application") If objApp Is Nothing Then Set objApp = CreateObject("Outlook.Application") ' Outlook wasn't open when this function started. blnOutlookInitiallyOpen = False End If If Err 0 Then Beep: _ MsgBox "Error in " & strProcName & " (1): " _ & Err.Number & " - " & Err.Description: _ End Sub References are - Visual Basic for Applications - Microsoft Access 12.0 Object Library - Microsoft Outlook 12.0 Object Library - OLE Automation - Microsoft DAO 3.6 Object Library I posted the message on an Access Newsgroup and it was suggested that the issue could be binding. I am not sure I really understand early and late binding in spite of some technical stuff I have read but it doesn't seem to change the situation. I changed Dim objApp As Outlook.Application to: Dim objApp As Object Still get error 429 - Active X component can't create object. I turned off Kaspersky AV and it made no difference. Not sure what to try next. |
Ads |
#2
|
|||
|
|||
![]()
Seems I managed to solve the problem on my own. The answer seemed to be to
run Office Diagnostics in Access 2007. It didn't report any errors but after running that, suddenly objects were recognised. I had never heard of it before but found a post on a newsgroup to either run Office Diagnostics in Office 2007 or Detect and Repair in earlier versions. Thanks to Sue Mosher. Check http://www.devnewsgroups.net/group/m...opic58421.aspx "NevilleT" wrote: I am trying to send an email with an attachment from Access 2007. I ran into problems with getObject and createObject. The object is "Nothing" even if Outlook is open. To try and isolate the problem, I created a new database to do some testing with the following module Sub test() Dim objApp As Object Dim blnOutlookInitiallyOpen As Boolean On Error Resume Next blnOutlookInitiallyOpen = True Set objApp = GetObject(, "Outlook.Application") If objApp Is Nothing Then Set objApp = CreateObject("Outlook.Application") ' Outlook wasn't open when this function started. blnOutlookInitiallyOpen = False End If If Err 0 Then Beep: _ MsgBox "Error in " & strProcName & " (1): " _ & Err.Number & " - " & Err.Description: _ End Sub References are - Visual Basic for Applications - Microsoft Access 12.0 Object Library - Microsoft Outlook 12.0 Object Library - OLE Automation - Microsoft DAO 3.6 Object Library I posted the message on an Access Newsgroup and it was suggested that the issue could be binding. I am not sure I really understand early and late binding in spite of some technical stuff I have read but it doesn't seem to change the situation. I changed Dim objApp As Outlook.Application to: Dim objApp As Object Still get error 429 - Active X component can't create object. I turned off Kaspersky AV and it made no difference. Not sure what to try next. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Opening *.PST file: "Can't open this item. Outlook blocked access to this potentially unsafe item." | R2D2 | Outlook - General Queries | 1 | September 16th 07 08:14 AM |
Remote Access or shared LAN access of Outlook without using Exchange Server ???? | Synapse Syndrome | Outlook - General Queries | 8 | June 22nd 07 09:11 PM |
Remote Access or shared LAN access of Outlook without using Exchange Server ???? | Synapse Syndrome | Add-ins for Outlook | 8 | June 22nd 07 09:11 PM |
Is it possible to access Outlook from home without web access, an. | Rob King | Outlook - Installation | 1 | January 5th 07 08:29 PM |
Outlook should access Outlook Web Access to sync schedule. | OvertaDover | Outlook - Calandaring | 2 | July 5th 06 01:42 AM |