Automating Outlook 2007 problem with sending mail

  • Thread starter Thread starter Norm
  • Start date Start date
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
 
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.
Similar threads
Thread starter Title Forum Replies Date
S Outlook 2007: automating form with macro Outlook VBA and Custom Forms 2
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
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
ughlook Open multiple contacts in NEW Outlook? Using Outlook 2
G Outlook translation feature is off Using Outlook 2
J Outlook 2010 does not let me put any account Using Outlook.com accounts in Outlook 3
P 3 of 5 PST files don't install from d:\outlook but only from D:\ Using Outlook 7
HarvMan January Windows 10 preview update force installs new Outlook Using Outlook 1
L Outlook 2010 - new installation on Windows 11 - aplzod32.dll is not a valid Add-in Using Outlook 12
J Outlook troubleshooting/logging - option grayed out Using Outlook 2
B Arrows missing from Outlook emails vertical scrollbar Using Outlook 0
G Outlook 2021 (New) doesn't respect default browser Using Outlook 8
B Outlook or iPhone turning tabs into spaces in Outlook Notes Using Outlook 1
P newly installed Office 365 includes OLD Outlook Using Outlook 6
R Outlook ribbon menu default? Using Outlook 7
H Spam email in Gmail not visible in Outlook Using Outlook 3
J How to transfer Win 10 Outlook to new Windows 11 pc? Using Outlook 11
J Renegade spam URL line displayed in old local Outlook 365 email title Using Outlook 3
G Reduce whitespace in Outlook desktop Contact Cards display Using Outlook 3
C Outlook classic via 365 Using Outlook 2
Dr. Demento Analogous Outlook code to read info into an array (or collection or whatever) Outlook VBA and Custom Forms 7
S Repair Outlook Using Outlook 8
V Outlook Form ListBox is not editable Outlook VBA and Custom Forms 2
F Outlook's contacts Using Outlook 1
D Outlook 2003 stopped dead Using Outlook 2
G Cannot receive emails from gmail account in Outlook 365 Using Outlook 1
E "Cannot display the folder. MS Outlook cannot access the specified file location" Using Outlook 8
P Outlook 2016 Working Offline Using Outlook 2
Rupert Dragwater Cannot reestablish gmail (email address) account in Outlook 365 Using Outlook 11
O Outlook 365 synchronisieren Exchange Server Administration 1
kburrows Outlook Classic - JPG files are corrupted when opened or saved Using Outlook 3
F Sync Outlook Calendar Using Outlook 0
G Change default font size in sticky notes - Outlook Desktop 2021 Using Outlook 2
C VBA in "New Outlook?" Using Outlook 0
D New Outlook with Business Basic Plans Using Outlook 0
D Outlook 2021 not working with Outlook 2003 installed Using Outlook 5
D Outlook 2003 stopped working - get they dialog box asking for username & Password Using Outlook 2
T Outlook 2021 hangs in close on taskbar occasionally Using Outlook 1
M Duplicate removal feature in Outlook 2021 is faulty Using Outlook 2
D.Moore Outlook COM addins source folder Using Outlook 12
P Removing Outlook 365 Account from Send/Receive Using Outlook 3
kburrows Outlook Automatically Merging Contacts Using Outlook 2
A Outlook 2016 Outlook 2016 vs. New Outlook Using Outlook 4
D Outlook Desktop App Email Software Using Outlook 0
efire9207 VBA Outlook Contacts Outlook VBA and Custom Forms 6

Similar threads

Back
Top