Automating Outlook 2007 problem with sending mail

Status
Not open for further replies.
N

Norm

Hi,

I hope this is the right newsgroup to ask this in. I have an application

written in Visual Basic 6 SP6 that automates Outlook. It has worked fine

until I upgraded to Outlook 2007 and for some reason it will not resolve the

names correctly. So I am assuming that something has changed and the code as

written will no longer work. The code I am using is pasted below and hope

that someone can spot what needs to be changed for Outlook 2007.

Thanks,

Norm

Do

bCheck = False

sPath = CStr(i)

MyReport = sGetINI(AppPath & "\ProgramIni\Supervisor Logs.ini",

"Path", sPath, Default)

If MyReport = "" Or MyReport = "0" Then Exit Do

oMail.Recipients.ADD MyReport

bCheck = oMail.Recipients.ResolveAll-----This line is the problem,

bCheck will remain false even on a good address.

If Not bCheck Then

AllReports2 = MyPath2 & MyReport

MyPath2 = AllReports2 & ";"

GoTo Skip1

End If

AllReports = MyPath & MyReport

MyPath = AllReports & ";"

Skip1:

Set objMailitem = Nothing

i = (i + 1)

Loop
 
N

Norm

Well the code is working now. Not sure what happened, but it started working

this evening, without changing anything. Guess I don't need any help at the

moment. :)

Thanks anyway,

Norm

"Norm" <NormF4@newsgroups.nospam> wrote in message

news:F0DB9F21-4B05-4885-801C-0B79BC921168@microsoft.com...
> Hi,

> I hope this is the right newsgroup to ask this in. I have an application
> written in Visual Basic 6 SP6 that automates Outlook. It has worked fine
> until I upgraded to Outlook 2007 and for some reason it will not resolve
> the names correctly. So I am assuming that something has changed and the
> code as written will no longer work. The code I am using is pasted below
> and hope that someone can spot what needs to be changed for Outlook 2007.

> Thanks,
> Norm

> Do

> bCheck = False

> sPath = CStr(i)

> MyReport = sGetINI(AppPath & "\ProgramIni\Supervisor Logs.ini",
> "Path", sPath, Default)

> If MyReport = "" Or MyReport = "0" Then Exit Do

> oMail.Recipients.ADD MyReport

> bCheck = oMail.Recipients.ResolveAll-----This line is the problem,
> bCheck will remain false even on a good address.

> If Not bCheck Then

> AllReports2 = MyPath2 & MyReport

> MyPath2 = AllReports2 & ";"

> GoTo Skip1

> End If

> AllReports = MyPath & MyReport

> MyPath = AllReports & ";"

> Skip1:

> Set objMailitem = Nothing

> i = (i + 1)

> Loop

>
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
S Outlook 2007: automating form with macro Outlook VBA and Custom Forms 2
D Automating a scheduled task with Outlook Using Outlook 5
I Automating message move between folders Outlook VBA and Custom Forms 0
R Automating from excel into shared Calendars Using Outlook 1
C Automating subject line Using Outlook 1
L automating a BCC on every email Using Outlook 1
S Merging SharePoint and user calendars or automating meetings Using Outlook 7
S Merging SharePoint and user calendars or automating meetings Using Outlook 2
J Automating Shared Calendar appointment reminders Using Outlook 1
T Automating Exporting to pst file Outlook VBA and Custom Forms 3
J Automating Word from script Outlook VBA and Custom Forms 8
S Automating the selection of email accounts upon adding email addre Outlook VBA and Custom Forms 1
HarvMan Outlook 365 PST Report Using Outlook 0
V Upgraded Outlook Using Outlook 1
J Outlook 2010 Outlook/Win7 Client logging Event ID 36887 Using Outlook 0
R How to get the Items object of the default mailbox of a specific account in a multiple account Outlook? Outlook VBA and Custom Forms 0
T Why does outlook 2010 convert only some forum notifications to plain text? Using Outlook 2
M In Outlook Calendar remove the buttons: 'Today' and '<' (Back a day) and '>' (Forward a day) that are below the Ribbon and above the calendar display. Using Outlook 0
J Moved many emails to Outlook external folder, need to delete on Gmail server Using Outlook 13
P Scheduling a meeting in Outlook Outlook Wishlist 4
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
R Outlook 2019 Using Outlook 0
N Outlook Has Become Sluggish Using Outlook 14
HarvMan Outlook 365 Calendar Using Outlook 12
A calendar invites sent from Microsoft Outlook to Mac Outlook is not working Calendar Printing Assistant 2
L Outlook 2016 Contacts missing in Outlook 365 Using Outlook 1
R seperate read layout to design in outlook 2016..Help!! Outlook VBA and Custom Forms 3
A Outlook replies not using "delivered to" address in From Using Outlook 1
GregS Why is Outlook 2016 mail in Outlook.com? Using Outlook 1
G Recurring tasks break links Outlook 2016 Using Outlook 5
L Outlook saved email templates Using Outlook 1
P Outlook for Mac - emails are not sent out beginning last week Using Outlook 1
V Gmail in Outlook Using Outlook 0
D Outlook VBA error extracting property data from GetRules collection Outlook VBA and Custom Forms 10
S Verwendung von Outlook 2007 Using Outlook 0
T "Words In Recipient's Address" Rule Causes Outlook To Stop Processing Rules Using Outlook 3
J Outlook 2013 Change color of text in data fields of contacts in Outlook 2013? Using Outlook 3
T Pictures degrade each time an Outlook item is edited and re-saved Using Outlook 1
Y Outlook 2013 Stop Outlook from automatically assigning categories to Tasks Using Outlook 0
A How to get body of all emails in outlook 2016 to view in blue color Using Outlook 1
J Edit auto-complete list in Outlook 2016+/365? Using Outlook 0
O Export Outlook calendar appointments by filters and date range Outlook VBA and Custom Forms 1
S Outlook not receiving mail Using Outlook 1
GregS Outlook 365 blocked by Google popup Using Outlook 2
T upgrade from outlook.com to Outlook Using Outlook 2
R Outlook Autoforward rule do not work for NDR messages Using Outlook 1
Commodore Outlook (2013) issues with icloud.com mail Using Outlook 0
N Extract Outlook emails to excel Outlook VBA and Custom Forms 2
D Add date next to day name in Outlook Today calendar view Using Outlook 1
D iCloud Add-in not working in Outlook 2013 and Outlook 2016 After Windows Upgrade & iCloud Upgrade Using Outlook 2
Similar threads


















































Top