Automating Outlook 2007 problem with sending mail

  • Thread starter Thread starter Norm
  • Start date Start date
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
 
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
 
Back
Top