After various searches (when working) to no avail resorting to new post. apologies if answered elsewhere.
Short Backstory.
MS Access 2016 32bit. Lots of DB's happily emailing in the background using vba code.
Company decides to finally upgrade to win10 and fully adopt 365. Great. Although that now means Access365 in 64bit.
I have managed to adjust code all over the place for the 32/64bit change but cant find a solution for the following code.
This is just one example - i use variations of this code all over the place - even in some functions
its driving me up the wall.
using Display mode just about works though referencing recipients is a minefield - but i also need send mode to work.
Any solutions?
Short Backstory.
MS Access 2016 32bit. Lots of DB's happily emailing in the background using vba code.
Company decides to finally upgrade to win10 and fully adopt 365. Great. Although that now means Access365 in 64bit.
I have managed to adjust code all over the place for the 32/64bit change but cant find a solution for the following code.
Code:
Dim app As Outlook.Application
Dim msg As Outlook.MailItem
Dim recipTO As Outlook.Recipient
Dim recipCC As Outlook.Recipient
Dim Att As Outlook.Attachments
Set app = CreateObject("outlook.application")
Set msg = app.CreateItem(olMailItem)
todayDate = Format(Date, "DDMMYY")
FileName = Application.CurrentProject.path & "\Daily" & todayDate & ".xlsx"
DoCmd.OutputTo acQuery, "Daily Report", acFormatXLSX, FileName, False
With msg
Set recipTO = .Recipients.Add("email.address@here.com")
Set Att = msg.Attachments
Att.Add FileName, olByValue, 1, "Todays Report as of " & todayDate
.subject = "Daily Report - Generated (" & Format(Now(), "dd.mm.yyyy") & ")"
.HTMLBody = tmpEM
.Send
End With
This is just one example - i use variations of this code all over the place - even in some functions
its driving me up the wall.
using Display mode just about works though referencing recipients is a minefield - but i also need send mode to work.
Any solutions?
Last edited: