access db upgrading

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » Access 2007 db upgrading to 2013 - Sendobject | Access forum

Access 2007 db upgrading to 2013 - Sendobject | Access forum

resolvedResolved · High Priority · Version 2013

Andy has attended:
Access Introduction course
Access Intermediate course
Access Advanced course
Access Advanced course

Access 2007 db upgrading to 2013 - Sendobject

Hi
I have a db that was built using Access 2007, and I am upgrading to 2013.
I send out regular monthly reporting (PDF) to hundreds of Suppliers by email, using 'SendObject'.
In 2007 there is some formatting avaiable in the Message Text so that i can have a paragraph and a sign off on the email.
However, when i have tested the function using 2013, the limited formatting disappears and all the message text appears as one long line.
Is there a way of getting the formatting back when using 2013? I have tried using the 'templete' option but it doesn't seem to want to add the template to the email.
any solutions/suggestions would be appreciated!

RE: Access 2007 db upgrading to 2013 - Sendobject

Hello Andy,

Hope you enjoyed your Microsoft Access courses with BEST Training. Thank you for your question regarding your database.

The trainer who can best answer this question is available this Friday and will take a look at it then. As it relates to your specific database, your question may be outside the scope of the forum, but we will give guidance based on what you have described.

Should the answer involve more time and complexity (i.e. reviewing your actual database) we would advise of any further time and costs should you want to progress it further on a consultancy basis.

Kind regards,

Richard

RE: Access 2007 db upgrading to 2013 - Sendobject

Hi Andy,

Thank you for the forum question. If you want to control the formatting in an email you can do it by writing the macro. If you add a module to you database and copy and paste the code below this will create an email and display it. I am using HTML code to control the formatting.



Sub MailToClients()

Dim OutApp As Object
Dim OutMail As Object

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
' Change the mail address and subject in the macro before you run it.
With OutMail
.To = "xx@xxx.xxx"
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.BodyFormat = olFormatHTML
.HTMLBody = "<span style=""font-family: Arial; font-size: 16pt;"">This is a test.</span> <br> <span style=""font-family: Arial; font-size: 12pt;"">This is the second line.</span><br><span style=""font-family: Arial; font-size: 12pt;"">This is the Third line.</span>"



' You can attach files by uncommenting the following line.
'.Attachments.Add ("C:\test.txt")
' In place of the following statement, you can use ".send" to
' send the mail.
'.Send
.display
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub

I hope this can guide you in the right direction.


Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Fri 5 Jun 2015: Automatically marked as resolved.


 

Access tip:

Dsum

You can create percentage values based on individual products / items by using a Dsum function (used with a grouped query)

[Each value column] / Dsum[field:total for the column needed to be calculated],[tablename]

View all Access hints and tips


Server loaded in 0.08 secs.