Data Collection Via Email (1 Viewer)

5576joe

New member
Local time
Today, 12:44
Joined
Sep 11, 2013
Messages
4
Hi again!

After the great help I got last time I thought I'd come here with another problem I'm stuck on and can't seem to find a solution online.

I have a table of data which I am collecting updates on from various users around the world. I have successful made the Collect Data via Emails function work but it is quite time consuming to send out the emails and I would like it to be user friendly for other users. I have two problems:

1. How can I write a simple macro that will run the same steps/settngs each time for data collection and therefore send out the email bypassing the wizard? This would then be assigned to a button and make it straightforward.

2. Can I customise the format of the email that goes out i.e. an HTML template saved somewhere?

Appreciate any help on either of my probelms. Thanks!
 

djaekdns123

New member
Local time
Today, 12:44
Joined
Oct 15, 2013
Messages
8
Hi!

I, the wizard does not appear

You reference my coding

=================================================================

Dim olApp As Object
Dim objMail As Object

On Error Resume Next 'Keep going if there is an error


Set olApp = GetObject(, "Outlook.Application") 'See if Outlook is open


If Err Then 'Outlook is not open
Set olApp = CreateObject("Outlook.Application") 'Create a new instance of Outlook
End If

'Create e-mail item
Set objMail = olApp.CreateItem(olMailItem)

With objMail

'Set body format to HTML
.BodyFormat = olFormatHTML
.To = Me.Text0
.Subject = Me.Text2
.HTMLBody = Me.Text4
.Send

End With

MsgBox "Operation completed successfully"

=================================================================

I hope that helping you :)

Bye
 

Users who are viewing this thread

Top Bottom