Modules & VBA :: Edit Subject Line Of Outlook Email

Aug 27, 2014

I'm trying to write a line of VBA code (in an existing Access 2010 DB) that changes the Subject Line of all selected emails in my Outlook Inbox to today's date.

View Replies


ADVERTISEMENT

Modules & VBA :: Unable To Capture A Newly Arrived Mail In Outlook With Respective Subject Line

Jul 14, 2015

I am trying to capture a newly arrived mail in outlook with respective subject line. The below code works for me on 2010 outlook but when new mail arrive in outlook 2013 ,Mrthod Items_ItemAdd do not get called.

Code:

Option Explicit
Private WithEvents Items As Outlook.Items
Private Sub Application_Startup()
Dim olApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Set olApp = Outlook.Application
Set objNS = olApp.GetNamespace("MAPI")
' (1) default Inbox

[Code]...

View 10 Replies View Related

Email In Snapshot Format And Subject Line

Oct 28, 2004

Hi,

I have been reading all of your post for days now and can't find the answer to my question.

I have however found the answer to one of my programming problems. Thanks to all of you.

I have used Access as a data supplier but this is my first attempt to program in access.

I have absolutly no experience with VB code. And a limited amount of experience with macros in access only.

My question(s) are:

1. I need to send a single report (page) in an email (snapshot format) to a person using a command button. This report should be sent from the form that the person is currently looking at. Currently my command button sends the report in snapshot format but it sends the whole database.

2. This report will be used as a tracking mechanism for another department and I will need a specific name to store the email in a certain location. So that it can be tracked at a later date. I want (that doesn't mean that it can) Access to automatically put the subject line in the email. I know under the sendobject macro you can set the subject line the same for each email. But I need the subject line to match the information in several of my text boxes from a table. For instance: Subject line should read: [Permit number][CountyId][Inspector's Initials][Date]. Can this be done at all and if so how.

Thanks so much for all that you have done already.

Tasha

View 14 Replies View Related

Modules & VBA :: Can't Make New Line When Pushing Outlook Email

Mar 20, 2014

i'm trying to send an Outlook e-mail from Access. Everything works fine except for one thing:

When generating the HTMLBody I use vbNewLine for starting a new line in the string that works fine as long as being in Access. However after displaying it in Outlook there are no any new lines in the mail text; the complete text is one mass.

I tried to use Chr(13) but had the same result.

View 2 Replies View Related

Modules & VBA :: Update Subject Of Emails In Outlook That Have Already Been Received

Jul 22, 2014

I'm trying to automate some processes. My company uses Outlook 2010 and every day we need to go into our "Sent" folder and rename the Subject line of all of our sent emails. We change the subject to a standardized format depending on the content of the email and who the email was sent to. These are then used as part of an equation to tally our Transactions Per Hour. (TPH)

I've already designed a small Access 2010 utility to track the TPH, but I would like to add the functionality to parse some data from the subject lines of my "Sent" folder, and automatically make changes to save some time.

Here is my thought process:

- Click "Process Sent Emails" button from TPH utility.
- Access runs through each email in the "Sent" folder (or perhaps only selected emails) and changes the Subject line per simple Select Case criteria (I can figure that part out).

View 2 Replies View Related

Modules & VBA :: Not Allowing To Move Outlook To Next Line

Oct 10, 2014

When I build the statement I want to email and view it in a MsgBox the lines space correctly with the code vbCrLf.However when I send that text out as the body of the email, the spacing is no longer there and its just one big pile of nonsenses. In the MsgBox I see it correctly as:

Tool Box 5
Drawer 3 Tag Number 4
Drawer 2 Tag Number 6
Tool Box 7
Drawer 8 Tag Number 2

But in the Email it comes out as:
Tool Box 5 Drawer 3 Tag Number 4 Drawer 2 Tag Number 6 Tool Box 7 Drawer 8 Tag Number 2

How do I make Outlook correctly space?

View 3 Replies View Related

FieldNames In Subject Line Of SendObject Action In Macro

Aug 6, 2004

I have a Macro setup and SendObject is one of the Actions. It is setup to send an existing report. Is there a way to insert a fieldname from that report into the Subject line of the e-mail that is sent? That would be great, instead of having the same subject line for every e-mail, using the date or something like that. Please let me know. Thanks.

View 3 Replies View Related

Modules & VBA :: Send Meeting To Outlook - Address Item Line Causing Error

Mar 24, 2014

I'm trying to have a command button send info on the form straight to Outlook as a meeting. So far, the code below works apart from the address bit. I need the code to automatically add the same 2 email addresses as recepients everytime.

Error message highlights the red line below with the following message:

Runtime error '438'
Object doesn't support this property or method

I'm new to VBA, so don't understand what is wrong here. The reference is set, I've tried different permutations of the "To:" & "Recipients.Add" for the email address with no joy.

Code:
Private Sub cmdSend_Click()
Dim outApp As Object
Set outApp = CreateObject("Outlook.application")
Set outmail = outApp.CreateItem(olappointmentitem)

[Code] .....

View 10 Replies View Related

Email: Subject Title

Mar 11, 2005

Does anyone know how to put in a file reference number automatically into the subject bar of an email?

This is the code that i am currently using:

On Error GoTo Err_Handler
MsgBox "THIS FEATURE WILL ONLY EXPORT FILES WITH TODAYS REFDATE"
If [CboExport] = "Today" Then
Dim rst As Recordset
Dim db As Database
Set db = CurrentDb
'Create Recordset
Set rst = db.OpenRecordset("SELECT tblAT.FileNr, tblAT.RefDate " & _
"FROM tblAT " & _
"WHERE (((tblAT.RefDate)=Date()));", dbOpenDynaset)
'Check to see if there has been records recorded today
If rst.EOF = True And rst.BOF = True Then
Beep
MsgBox "THERE ARE NO RECORDS WITH TODAYS DATE, REFER TO SPECIFIC DATE."
rst.Close
Set db = Nothing
Exit Sub
End If
'Export query as MS EXCELL

DoCmd.SendObject acSendQuery, "qryTodaysDate", acFormatXLS, company@somewhere.com, myboss@somewhere.com, , "File reference number ?????????"The following file is the latest extract from me as at " & Date & "."

regards, Steve

View 5 Replies View Related

Modules & VBA :: Email Subform Through Outlook

Jul 30, 2014

I'm trying to make it so when a subform is updated, it will email the contents of that subform to me. I've got it all working, except for the content of the email part.

Code:
Sub SendRepReassignment()
Dim oOutlook As Outlook.Application
Dim oEmailItem As MailItem
Dim objOutlookAttach As Outlook.Attachment
On Error Resume Next
Err.Clear

[code]...

View 3 Replies View Related

Modules & VBA :: Email In Outlook With Attachments

Jun 16, 2013

I am making a new database. And I want to confirm that I can do all the following in Access 2007 and how is best to do it.

1) A form where I can define:a unique Email Number starting at 1.
a directory eg "C:UsersPaulDesktop101 - Brick House"
an email address.
a Recipient Name
a Category for the email. Choosing either "Working" or "Complete". This would be part of the email subject.

2) a button which onclick lists all the files in the defined directory to a box on the form.

3) a button which onclick exports a report containing the list of files to PDF. Then attaches a zip of these files and the PDF report to an email in Outlook for revision before sending.

4)In Outlook the subject would be:

"The Directory Name" - "The Category" - "The Email Number"
"101 - Brick House - Working - Email 1"

5)In Outlook the body would simply be the subject of the email followed by the filenames of the 2 attached files, ie the PDF report and the zip.

View 7 Replies View Related

Query Result As Email Subject

Jan 8, 2007

Curently run a Send.Object function on a form to retrieve a unique record via a query. I'd like to be able to send a particular field returned by the query to use as the subject title in the email that is auto-created.
The query will only ever be returning a single record but that single record will change each time it is run.


Any ideas people?


Thanks in advance.

View 1 Replies View Related

Modules & VBA :: Sending Email Through Outlook By A Certain Date

Nov 26, 2013

I am a College Instructor and I would like to make a Database that will regularly email me a list of Students who are approaching the mid-point of their Program.Is it possible to program Access to email a list with Student Names, Registration Numbers, etc, etc. by a given date?

As of right now I have a Database with all of the students' pertinent information but I have to manually comb through the Database each week to see which students will require a Mid-Term interview that week.

View 7 Replies View Related

Modules & VBA :: Merge To Outlook Email Using Bookmarks

Aug 15, 2015

I have been trying to get this to work but without success.

My original source was [URL] ....

The code looks good apart from the fact that the Inspector was not Dimensioned. Anyway, here is my code which fails as the error message is that objSel is not set.

Code:
Dim MyOutlook As Outlook.Application
Dim MyMail As Outlook.MailItem
Set MyOutlook = New Outlook.Application
Set MyMail = MyOutlook.CreateItemFromTemplate(DLookup("TemplateFolder", "Company Details") & "eMail Template bm4.oft")

MyMail.To = strTarget
MyMail.Subject = "Test"

[Code] .....

View 1 Replies View Related

Modules & VBA :: Sending Email Without Outlook Being Installed

Aug 16, 2014

I have this VBA code:

Option Compare Database
Option Explicit
Private Const URL_CDOCONFIG As String = ""
Public Function SendEmail(ByVal sTo As String, ByVal sFrom As String, _
Optional ByVal sCC As String = "", Optional ByVal sBCC As String = "", _
Optional ByVal sSubject As String = "", Optional ByVal sBody As String = "", _

[Code] ....

It is being called with the following macro:

SendEmail("gregory.west@dbwsys.mb.ca","vba@dbwsys. mb.ca","","","Subject line","Body of eMail here")

But I get this error message.

The "SendUsing" configuration value is invalid.

View 1 Replies View Related

Modules & VBA :: Open Outlook And Send Email

Feb 3, 2014

I'd like a command button to open Outlook and create a new email message with the To and Subject fields already populated with what I want, is there anyway to do this?

View 1 Replies View Related

Modules & VBA :: Search Outlook For Email Addresses

Nov 25, 2013

How I could initiate a search from MS Access on an Outlook folder for an email addresss.

I would like to to work just as if you were using the outlook 'Try searching in All Mail Items'

View 11 Replies View Related

Modules & VBA :: Email Individual Pdf Files In Outlook

Jul 23, 2015

What i would like to do is replace the DoCmd.OutputTo line with a DoCmd.SentTo line to email the reports to the appropriate faculty instead of just saving them in the folder.

I used this line but it did not work: DoCmd.SendObject (acSendReport, , acFormatPDF, "vtblfaculty.email&'@xxx.edu'","me@xxx.edu",,"test ","this is a test",-1,,)I have been working on this forever!

Public Sub something3()
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT DISTINCT tblsection.Faculty, left(vtblfaculty.firstname,1)&vtblfaculty.lastname AS fn, vtblfaculty.email FROM vtblfaculty INNER JOIN tblsection ON tblsection.faculty=vtblfaculty.faculty WHERE term=" & Forms!frmimport!cbxTerm)

[code]...

View 6 Replies View Related

Modules & VBA :: Button To Open Up Outlook Email

Jun 26, 2014

I would like to create a button that when pressed opens up an outlook email. The email address will be populated by one email address every time. I don't want it to automatically send as the body will need to be filled out by the user. It would be useful if the date and time it was sent could be recorded in the form somewhere too (would this be in a text box?).

View 3 Replies View Related

Modules & VBA :: Search Outlook Exchange For Email Address

Dec 3, 2013

I'm trying to see if can search outlook exchange from access vba to get email address (using windows user name) .

View 1 Replies View Related

Modules & VBA :: Showing In Access If Email In Outlook Has Attachment

Oct 15, 2014

I found a code that will go trough an emailbox and export all emails to a table in access. This part is working OK (except the received date). I also wante to show in the table if the email contains an attachment, but that part is not working at all. The project actually is meant to store the emails on a shared drive and attachments and have the emails in Access so I can see them all and recall the one needed.

Code:
Private Sub Command14_Click()
Dim TempRst As DAO.Recordset
Dim rst As DAO.Recordset

[Code].....

View 8 Replies View Related

Modules & VBA :: Adding Email Address To TO Field In Outlook

May 2, 2014

I have vba code set up to automate a query output to email with outlook. I am having issues with the "TO" field. I have tried different types of code, such as the following:

1) MyMail.To = MailList.Fields("EmailAddress")
2) MyMail.To = MailList.Fields("EmailAddress") & ";"

Both of these work, but the issue I am having is the "TO" field in the outlook message looks like this:
admin@blahblah#mailto:admin@blahblah#

Why my code is adding the email address twice, I need to get rid of the #mailto:admin@blahblah# but I do not know how or why it keeps adding that end part.

View 3 Replies View Related

Modules & VBA :: Attach Multiple Items To Outlook Email

Aug 6, 2015

I am currently in the process of creating a form that will allow you to enter details for an email sent, select a number of documents from a list box and then open the mail message pre-written with attachments. The attachments reside in a list box currently, and I am attempting to use a "For Each" with item selected.column(3) as the file path, as column(3) contains the filepath from the table.

Currently my code is:

Private Sub OutlookBut_Click()
Dim olApp As Object
Dim objMail As Object
Dim varItm As Variant
On Error Resume Next
Set olApp = GetObject(, "Outlook.Application")

[Code] ....

When this code runs, outlook will open as a process when it is closed, but then freeze and not allow me to see it or access it in anyway. If Outlook is opened Microsoft office usually gets angry at me and decides to throw error messages at me.

View 2 Replies View Related

Modules & VBA :: Access Email With Embedded Image Using Outlook

Sep 29, 2013

I have code that automatically send emails out from an Access Customer Contacts Database. I am using Access and Outlook 2007 but the code needs to work with later versions of Access and Outlook.

I have very poor knowledge of coding and usually manage to cobble something together from looking at other code on the net but don't understand most of it.

I have the following code which works perfectly except I want to be able to embed an image in the email body (not have the image as an attachment but actually show it in the body of the email).

Most of the code I have found around this topic is too complex for me to understand and utilise within the context of the code I have.

Ideally I want to take the image from an attachment field in a table returned by the "tblMailingList_Query".

Code:
Private Sub Command10_Click()
Dim MyDB As Database
Dim MyRS As Recordset
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem

[Code] .....

View 2 Replies View Related

Modules & VBA :: Outlook Starts Countdown When Sending Email

Aug 27, 2014

I have access db sending report with outlook every Monday.

But the problem is if outlook is open when I start the db, email goes in to outgoing folder and msg box of outlook opens saying " outlook will close after countdown if I do not hit the "DO NOT EXIT" button or "EXIT AND SEND LATER" button.

If I hit "EXIT AND SEND LATER" button, it sends next time I open the outlook.

Is it possible to prevent outlook doing this?

View 14 Replies View Related

Modules & VBA :: Read Outlook Email Messages In Windows 8

Sep 11, 2014

I wrote VBA code to pull email messages from Outlook in order to create an alert if a message with a specific subject line is not received. I have the system coded to send the alert if the message isn't found before the system encounters a message with a SentOn date/time more than two hours old.

The code has worked great for over a year, but now my company is migrating to Win8 and I'm having issues with the code. The machine that normally runs the process uses XP and Access 2007. The code also works on another machine running Windows 7 and Access 2010.

The issue I'm having in Win8, with Access 2010, is that the code isn't pulling the most recent message first. Instead, it is selecting a message from about two weeks ago, and then cycling through the other messages from that point. I know there are ways I can code around this, but I don't want to if I don't have to.

Is there a setting that I'm missing? I've included the basic code to pull the email messages below:

Code:
DoCmd.SetWarnings False
Dim ol As Outlook.Application
Dim ns As Namespace
Dim Inbox As MAPIFolder
Dim Item As Object
Dim strSubject, strSentDate As String

[Code] .....

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved