Solved Using ACCESS, WORD and OUTLOOK to send bulk E-Mails (1 Viewer)

All the errors that can occur are explained in the accompanying help file. Click the Help button to view it.
The easiest way of determining all the required settings is to view the email account details in Outlook.

When does ‘it made no difference’ mean exactly when you reverted to classic Outlook?
 
All the errors that can occur are explained in the accompanying help file. Click the Help button to view it.
The easiest way of determining all the required settings is to view the email account details in Outlook.

When does ‘it made no difference’ mean exactly when you reverted to classic Outlook?
In post #9 someone said new Outlook cannot be used for automation, so I went back to classic, but I get the same error messages
 
That is the problem. I cannot find these settings and Copilot was no help.
In classic Outlook:
  1. Go to File | Account Settings | EMail
  2. Select an account and click Repair | Advanced Options then tick Let me repair my account manually and click Repair
  3. A dialog box opens with your incoming email settings including username, password server & port
  4. Click the Outgoing email dropdown to view the outgoing server / port / encryption method etc
No idea how to do this in New Outlook as I don't have it
 
In post #9 someone said new Outlook cannot be used for automation, so I went back to classic, but I get the same error messages
I tried using the code you supplied in post #8 but needed to change the With olMail section to

Code:
    With olMail
            .To = !MailAddress
            .Subject = !Subject
            .Body = tempBody
            .Send ' Use .Display for testing
    End With

It didn't crash but I got error 450 (Wrong number of assignments or invalid property assigment on the .To =!MailAddress line

Rather than reinvent the wheel can you post your database with any personal info removed
 
In classic Outlook:
  1. Go to File | Account Settings | EMail
  2. Select an account and click Repair | Advanced Options then tick Let me repair my account manually and click Repair
  3. A dialog box opens with your incoming email settings including username, password server & port
  4. Click the Outgoing email dropdown to view the outgoing server / port / encryption method etc
No idea how to do this in New Outlook as I don't have it
Earlier, I was able to switch to the classis version, but I am no longer able to do that. Outlook will no longer allow it. And I cannot open it from the Windows Start menu either. It is listed as an option but will not open anymore. Thank you for your help with this. I really appreciate you trying to help. I am tired. I am going to read for a while.

I found these instructions from Copilot as how to use registry to switch to classic version:
1758654600024.png

I hate messing with registry entries, but I will see if this works.
 
Last edited:
According to this interesting article by Philipp Stiefel (sonic8) the name of the Office 365 SMTP server is:smtp.office365.com
 
Last edited:
According this interesting article by Philipp Stiefel (sonic8) the name of the Office 365 SMTP server is:smtp.office365.com
I read that too but it is not. It is something else that I cannot find.
 
I tried using the code you supplied in post #8 but needed to change the With olMail section to

Code:
    With olMail
            .To = !MailAddress
            .Subject = !Subject
            .Body = tempBody
            .Send ' Use .Display for testing
    End With

It didn't crash but I got error 450 (Wrong number of assignments or invalid property assigment on the .To =!MailAddress line

Rather than reinvent the wheel can you post your database with any personal info removed
This is a sub on a form. I use a command button to start it.
I have a field on the form named MailAddress so I used Me.MailAddress to supply the .To = field. Same with .Subject = .
 
From the supplied help file:
1758657558141.png
 

Attachments

  • 1758657524181.png
    1758657524181.png
    78.6 KB · Views: 7
Does this help?

If you are using a MS365 subscription product and are signed in, and cannot find or launch Classic Outlook - go to https://portal.office.com.

Click Apps and devices from the left navigation bar.

On the page that opens click the red button -Install Office.

The installer OfficeSetup.exe will download to your computer, now just run the installation again

From https://learn.microsoft.com/en-us/a...manently-turn-off-new-outlook?page=30#answers
Thanks. After altering the registry AND setting my default e-mail to Outlook Classic, It APPEARS to now be working and I am at least able to open classic again. I did this because if I did this:

Code:
    Dim olApp As Object, olMail As Object
    Set olApp = CreateObject("Outlook.Application")
ACCESS completely crashed because I was using New Outlook. So now, I will test these same commands using Outlook classic and see what happens.
 
Thanks to all of you who helped me. I have been able send bulk e-mails using Outlook classic by:
  1. Modifying the registry as in post #26, I created the registry as instructed and modified the second one as instructed so:
    • HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\Addins\OutlookNewToggle\EnableToggle\Value=1​
    • HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\ExperimentEcs\outlook\Overrides\Default=1​
  2. Opened Outlook Classic from the Start menu​
  3. Went to Windows settings and made Outlook classic my default e-mail system. (This was probably the problem all along).​
  4. Used Set olApp = CreateObject("Outlook.Application") to send my test e-mails.​
  5. Sent test bulk e-mails (2 of my e-mail addresses) to myself for testing using an open recordset that contains the e-mail address stored as text.​
I have never been a programmer so this kind of thing is a real challenge. I preferred to use Outlook automation instead of CDO but I could never get the settings right anyway. But once Outlook classic became my default e-mail system, all has gone well so far.

Next up is using a Word document content as the body of the e-mail. Cross your fingers, toes and eyes. This ought to be fun.
 
Code:
Dim olApp As Object
Set olApp = CreateObject("Outlook.Application")

causes this error to occur:
View attachment 121578
I DO have Microsoft Outlook 16.0 Object Library reference checked.

I have not a clue what this error message is. Do You?

Also, as the subject line suggests, I am attempting to send bulk e-mails to recipients (E-mail addresses stored as text in an ACCESS table) with a WORD document as the e-mail body and OUTLOOK as the vehicle to send them. Maybe I'm just nuts.
by chance do you have olApp anywhere else in your app?
 
Although Chat will probably give better info now a days, here is some simple Word automation to import and export to Word.
 

Users who are viewing this thread

Back
Top Bottom