Customized Email

I need to set up a double click event that will create a new email and
include certain fields from the record I'm currently in and use the
email address from another table/form (the 2 tables/forms are linked
by an ID#).  I also want it to include a generic message in the body
of each email (like a signature).  How do I do that?

0
serviceenvoy
9/13/2007 11:08:01 PM
access 16762 articles. 3 followers. Follow

2 Replies
458 Views

Similar Articles

[PageSpeed] 17

On Sep 13, 5:08 pm, serviceen...@gmail.com wrote:
> I need to set up a double click event that will create a new email and
> include certain fields from the record I'm currently in and use the
> email address from another table/form (the 2 tables/forms are linked
> by an ID#).  I also want it to include a generic message in the body
> of each email (like a signature).  How do I do that?

Without further information, probably the easiest way to accomplish
this is the docmd.sendobject method.

Something along these lines:

    DoCmd.SendObject acSendNoObject, , , FieldWithToAddress,
FieldWithCCAddress, FieldWithBCCAddress, FieldWithSubject,
FieldWithMessage & "text to be added to all emails", False

0
CompGeek78
9/13/2007 11:20:42 PM
<serviceenvoy@gmail.com> wrote in message 
news:1189724881.702009.60010@w3g2000hsg.googlegroups.com...
>I need to set up a double click event that will create a new email and
> include certain fields from the record I'm currently in and use the
> email address from another table/form (the 2 tables/forms are linked
> by an ID#).  I also want it to include a generic message in the body
> of each email (like a signature).  How do I do that?

Try something like:

Public Function EmailReps(strTo As String, Optional strSubject _
        As String, Optional strMsg As String)
'Set reference to Outlook
On Error GoTo Errhandler
Dim objOutl As Outlook.Application
Dim objEml As Outlook.mailitem

Set objOutl = CreateObject("Outlook.application")
Set objEml = objOutl.createItem(olMailitem)

With objEml
    .To = strTo
    .Subject = strSubject
    .Body = strMsg
    .send
End With

ExitHere:
Set objOutl = Nothing
    Exit Function

Errhandler:
    MsgBox Err.Number & ": " & Err.Description
    Resume ExitHere
End Function


Now call it like this:

Public Function MailIt()
Dim strSubject As String
Dim strMsg As String
Dim strTo As String

    Select Case Me.txtSub
        Case "AC"
            strTo = "Ashley Cove;Change History"
        Case "AR"
            strTo = "Arbor Ridge;Change History"
        Else
            strTo = "Change History"
    End Select

    strSubject = "Contract Changes to [" & Me.txtSub & " - " & Me.txtLot & 
" - " & Me.txtBuyer & "] By: " & Me.txtUser

    strMsg = Me.txtContractID & ",," & """" & Format(Now, "mm/dd/yy h:nn 
AM/PM") & """"

    Call EmailReps(strTo, strSubject, strMsg)
            Me.chkMailFlag = False
End Function

Notice how strSubject and strMsg are using form data in the subject and body 
of the email.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com 


0
Arvin
9/14/2007 3:26:47 AM
Reply:

Similar Artilces:

Custom Entity Relationship CRM 3.0
I have created a new custom entity (A) for which I need to create two referential relationships to other custom entities (B) & (C). (A) is the primary entity in both cases. The relationship between (A) and (B) acts normally. The relationship between (A) and (C) doesn't. When I try to add a (C) record from (A), (A) displays two records in the (C) lookup. One "record" displays data from system fields (created on and status). The second "record" displys data from the primary field. I am not able to access (C) record from the associated view in (A), but I can a...

setting up email account on my windows vista
Your IMAP command could not be sent to the server due to non-network errors." error message What is the complete error message Gulay -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can not and will not be acknowledged. "Gulay Dogan" <GulayDogan@discussions.microsoft.com> wrote in message news:3089BE5C-88A3-4EEB-8130-15CFB30B70BC@microsoft.com... > Your IMAP command could not be sent to the server due to non-network errors." > error message Please expand the error message, then copy and paste ...

Custom toolbar and macros
I am moving a user from Windows 2000 to XP and he has a worksheet with many custom Macros as well as the custon toolbar with it. We can move the worksheet and the macros will move with it. The problem is moving the custom toolbar with it. How do I get the toolbar to move along with the worksheet. One way: With the custom workbook active, choose Tools/Customize/Toolbars. Click Attach. Attach your custom toolbar to the workbook. In article <F0FC2885-07CB-4706-BC67-DEB7B664BACF@microsoft.com>, "MD" <MD@discussions.microsoft.com> wrote: > I am moving a user fro...

toolbar customization
533 MHz Power PC G4 384 MB SDRAM MAC OS X 10.3.3=20 Office X: Excel 10.1.5 (Service Release 1) When I drag command buttons to Excel's Standard Toolbar I get grayed-out = icons as follows: Hide Detail Show Detail Insert Rows Ironically the following buttons, dragged in precisely the same = fashionto the=20 Standard Toolbar, work satisfactorily: Insert Columns Delete Column Delete Row Any suggestions? Has MS discoveed and repaired these bugs for the May=20 2004 updates? While they're not bugs, they are confusing. You probably dragged the Insert Rows button from the Edit categ...

CRM Customization: Display Contact Info on Service Activity Form
We'd like to be able to open a service activity, and display all of the associated contacts' information (name, phone, address) on the same form. We have attempted to use IFRAMEs to load this information, but have so far been unsuccessful in achieving the desired effect. What is the best approach to take here? I am trying to do the same... What I really want is: 1) Service activity calendar view to show the customer name, number and address in the mouseover 2) When a service calendar item is clicked on, I would like the contact name, address and telephone listed in the main fo...

Keep loosing my Default email in MS Outlook 2003?
I have 4 different emails setup with our family computer. and one of them is the default email address that is used when composing new email. For some reason lately, my hotmail has become the default email. So I changed it back to how it was. Next day it's back to hotmail email account as the default email, for new emails. Is that the work of a virus or something? thanks. It is probably the work of one of the other users on the family computer. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. ALWAYS post your Outlook version. How...

Tracking customer orders when receiving stock
With our current POS system we can place items on order for a particular customer (whether we are holding the stock or not) and when we generate purchase orders the system automatically pops up letting us know we have pending orders for customers. We can then generate a purchase order based on this information. When we receive the stock, we can print out a report for that order that lists what stock needs to be allocated to which customers. Is there a way with RMS that we can do this? Unfortunately it is a regular occurance that our stock levels can be incorrect, for instance we may have a 0 ...

adding email accounts #3
How do I add other e-mail accounts to Office word 2007? To add email accounts to Outlook 2007, go into Tools, Account Settings and click New Patrick Schmid -------------- http://pschmid.net "Red4Con1" <Red4Con1@discussions.microsoft.com> wrote in message news:DE62EEFE-3DC4-4E11-8935-AC724AB2DFD3@microsoft.com: > How do I add other e-mail accounts to Office word 2007? You don't add email accounts to Office Word 2007. It is a word processor, not an email program. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All...

Email account password
I recently moved my PST from a machine using Win2000/Office 2000 to a PC using WinXP/Office XP. In Outlook 2002 I didn't even try to transfer the settings for my email accounts or rules; I set up my email accounts and rules manually. Every time I launch Outlook 2002, Outlook asks me to type the password for EACH email account. Each time I provide the password I click "Remember password", but Outlook still forgets the next time it launches. I even tried typing the passwords in the Tools | Email Accounts configuration screen with no luck. Help. Thx. Part II I have ...

Outlook 2003-Email Question
I am looking to find out if you can schedule in advance emails to be sent on certain days and times so that when you are away or busy, you don't have to remember to do it. =?Utf-8?B?ZHQ0NDQ=?= <dt444@discussions.microsoft.com> wrote in news:7D4CEE1D-9217-4616-9B18-107E51236542@microsoft.com: > I am looking to find out if you can schedule in advance emails to be > sent on certain days and times so that when you are away or busy, you > don't have to remember to do it. Create a new message. In the message, click Options. Under Delivery options, select the Do no...

i am receiving error while downloading my emails but i can send
hello everyone, I have a question for you. I am not able to receive emials from our email server.but i can send the email successfully. Any i dea.? i am stuck here. Thanks for yr help. Thanks, Bharat. bharat wrote: > > hello everyone, > > I have a question for you. > > I am not able to receive emials from our email server.but i can send the > email successfully. > Any i dea.? > i am stuck here. > > Thanks for yr help. > > Thanks, > Bharat. > > What is the exact error message you are receiving? ...

Send email to all Site Users
My organization has SharePoint Portal 2003 site. We are going to be making some changes to the site and would like to notify all the users of the site by email ahead of time. When I go to the Manage Users page the only action that appears to be available is Remove Selected Users. We add users by looking them up in our Exchange GAL. Is there anyway to send an email to all the Users of a given site? -Chris ...

Customize Does not WOrk
When I clip the customize outlook today button, it does not respond. Anyone have an idea of what the problem might be? Posted several times a day here: OL2000: You Cannot Customize Outlook Today After You Install Critical Update 813489 for Internet Explorer: http://support.microsoft.com/default.aspx?scid=kb;EN-US;820575 -- Russ Valentine [MVP-Outlook] "Glenn" <anonymous@discussions.microsoft.com> wrote in message news:05cb01c3cc7b$467a26c0$a101280a@phx.gbl... > When I clip the customize outlook today button, it does > not respond. Anyone have an idea of what the pr...

Outlook 2000 email
Greetings, I would very much appreciate it if someone can help me with this error. When I try to send a msg from Yahoo I get the following error: Message from yahoo.com. Unable to deliver message to the following address(es). <ahmed.wreidan@cnbcarabia.com>: 80.227.98.91 does not like recipient. Remote host said: 550 <ahmed.wreidan@cnbcarabia.com> Relaying denied Giving up on 80.227.98.91. We just swiched our DNS from New Zeland to AE. Thanks 80.227.98.91 is "dead" at the moment. Contact the ISP who owns this IP-range to get more info on the server. -- Roady...

How to display HTML in Custom Task Pane
Does anyone know if it is possible to program a custom task pane in Office 2007 (using VSTO) to display hosted web content (i.e. HTML). How about locally stored HTML? My team is looking at ways of providing modest on-screen assistance to support our custom Add-in that docks nicely within the application and can be coupled with a few controls. If it's not possible, we're stuck using CHM. Thanks in advance. ...

Word text copied into email loses formatting alignment
When copying a Word document (containing indented and numbered paragraphs and bullet points into an email, the left alignment of the document loses its justification. How can this be fixed? -- HK If the formatting is important, send the document as an attachment. You have no control over how the recipient sees the email. If you are concerned that the recipient might not have Word, use one of the free pdf converters to convert the document into a .pdf file. -- Hope this helps, Doug Robbins - Word MVP Please reply only to the newsgroups unless you wish to obtain my s...

Workflow email slow to send
When a workflow is ran and completed, the related email takes upwards of an hour to be delivered. When sending an email to a user from the contact page the email is delivered within a few minutes. Are there any known settings I should check to speed up the email process, perhaps an email polling timer somewhere? thank you in advance How is the mail being sent - are you using the email router to send mail created by workflows? Dave Ireland "tim-tw" <timtw@discussions.microsoft.com> wrote in message news:7B6052CB-7A7F-41EC-93FC-DD4458D5CD61@microsoft.com... > When a w...

XY Scatter with Custom Labels
I have a list of products, each with an X (a dollar amount) and a value (a percentage). Is it possible to have each point labeled with custom value i.e.: Printer, or Digital Camera, rather than it bein labeled with just the values being plotted ($1,000, 2% or $500, 7%)? Any ideas are appreciated. Thanks, Keit -- hatzipe ----------------------------------------------------------------------- hatzipet's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2789 View this thread: http://www.excelforum.com/showthread.php?threadid=47392 You can edit the text of a labe...

Change dates to a custom format via formula ... how to?
Hello, A2 has formula =NOW() which makes date today in this format: Tue.Apr.26.2011 How can I get my custom date formats so that the above date shows up as Tu.Apr.26.2011. In another sheet, I was kindly given this to make these types of changes: =IF($A$2<>"",TEXT($A$2,"yymmdd.")&CHOOSE(WEEKDAY($A$2),"Sn","Mn","Tu","Wd","Th","Fr","Sa"),"") I tried this, =NOW()&CHOOSE(WEEKDAY($A$2),"Sn","Mn","Tu","Wd","Th","Fr","Sa&...

Customer Report
Hello, I am hoping someone might assist me with a problem. I am trying to customize a customer report to show the Notes from the customer file. It has been suggested to me to run a query on this to pull the info I want. This is great, but not ideally what I am looking for. I want anyone in the office to be able to run the report and filter it to their specifications. For example: we have an anual catalogue and we do not send it to everyone on our mailing list. We want to send it to local customers who have spent money with us or who specifically request a catalogue. We have used up all ...

How to Customize Business Portal to show custom objects?
Hi, I need to Customize Business Portal to show my custom objects in "Primary Publishing List ResultViewer Web Part","Rich List ResultViewer Web Part","Form ResultViewer Web Part"? I need to create pages similar to Customer Summary page in sales center with my custom objects. How can i do that? Thanks, Mohan ...

Custom X-axis
Hi everyone. I need to create a custom x-axis in which the values double at each interval. i.e. At the first interval the value must be 20, the next 25, 31.5, 40, 50, 62 ...20,000. Even though the numbers do not have an similar differences (e.g. 25-20 is not equal to 62-5) I will still need these values to be equally spaced. Thanks for any help you give, it's greatly appreciated! Fred. PS. If you want to know what I'm doing, I'm plotting an amplitude:frequency graph, where each spacing between each frequency is 1/3 of an octave. Fred - Two options. Make a Line chart,...

GPS Customization Query
Hi All, Is there a way to avoid/remove "Quick Links" and "Help" links from the Business Portal Site for the end users? Any help on this would be very handy. Regards, Kuldeep ...

change local customer to global customer
I am trying to change the local customers that i have in my store database to global customers in hq I ran this querie in store administrator UPDATE Customer SET GlobalCustomer = 1 Then ran worksheet 401 in hq, but the customers did not update, then worksheet 350. Can someone help? Had the same issue ... this worked for me - need to set globalcustomer = 1; need to set lastupdated = getdate(*); need to set storeid = 'xxxx' (whatever is appropriate for you). Go into SO Manager and configure ENABLE GLOBAL CUSTOMERS and NEW CUSTOMERS DEFAULT AS GLOBAL. Need to run 401 TWICE (once...

How to customize column width in Ressource Usage report ?
Hi, When printing the Workload, Ressource Usage report, some of the durations are stated as #####.##. I tried to make the font smaller but it did'ent help. How do I make the report readable? I am using MS Project 2007 SP2. Br Bertrand If you goto Reports, Custom you can see all of the built-in reports and you can see what they are made of and you will see that they use a filter and a table (and other settings and stuff). The column width of each field is a property of the table. Find the report that you are interested in, then find the table that it uses, then e...