try again email forms

Hi there

I have searched for the codes to email a form/report in a body of an email 
and have Access connect to MS outlook to choose who to email to.  I have 
tried several different codes and do not understand code.   None of the ones 
that I have tried worked.  The last one I have tried is:

Dim mess_body As String
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
'MsgBox (mess_body)
mess_body = "The following Enrollment Form Order requires your approval: " & 
Me.Order_ID.Value
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
..To = " email@removed "
..CC = " email@removed "

Can someone help me with the code, let me know what I need to do to make it 
work, or point me to a website with code that may do the trick.  There maybe 
something in the code that I need to change to match up with my setup, but I 
am clueless when it comes to code.  Maybe there is a good book out there that 
I can buy?  Please let me know.  

-- 
Thank-you!
Ruth
0
Utf
2/13/2008 3:04:00 PM
access 16762 articles. 3 followers. Follow

1 Replies
697 Views

Similar Articles

[PageSpeed] 36

Hi again

I link the address in Outlook to Access,  called the table "EmailClient" and 
 tried the following code and get a message box that says "You canceled the 
previous operation"  Is there anything I can to to fix it?

Dim EmailClient As Variant
Dim stAppName As String
Dim ClientName As String

On Error GoTo Err_btnEmail_Click

‘ Look up the base directory of the e-mail client in table EmailClient
EmailClient = Trim(DLookup("OutLookAddress", "EmailClient"))
If IsNull(EmailClient) Then
    ' Open a simple form asking the user to enter the base directory
    DoCmd.OpenForm "EmailClient", , , , acFormAdd
Else
    If Not IsNull(Me!ContactEmail) And Not IsNull(EmailClient) Then
        ' if there is a \ on the end remove it
        If InStr(Len(EmailClient), EmailClient, "\") Then
            EmailClient = Left(EmailClient, Len(EmailClient) - 1)
        End If
        ‘ add the outlook client, set the command line options, add the form 
address
        stAppName = EmailClient & "\outlook.exe /c ipm.note /m " & 
Me!ContactEmail
        ‘ Launch Outlook
        Call Shell(stAppName, 1)
    Else
        MsgBox "The Email Client or Email Address is Null, please enter it"
    End If
End If
Exit_btnEmail_Click:
Exit Sub

Err_btnEmail_Click:
MsgBox Err.Description
Resume Exit_btnEmail_Click


-- 
Thank-you!
Ruth


"Ruth" wrote:

> Hi there
> 
> I have searched for the codes to email a form/report in a body of an email 
> and have Access connect to MS outlook to choose who to email to.  I have 
> tried several different codes and do not understand code.   None of the ones 
> that I have tried worked.  The last one I have tried is:
> 
> Dim mess_body As String
> Dim appOutLook As Outlook.Application
> Dim MailOutLook As Outlook.MailItem
> Set appOutLook = CreateObject("Outlook.Application")
> Set MailOutLook = appOutLook.CreateItem(olMailItem)
> 'MsgBox (mess_body)
> mess_body = "The following Enrollment Form Order requires your approval: " & 
> Me.Order_ID.Value
> Set appOutLook = CreateObject("Outlook.Application")
> Set MailOutLook = appOutLook.CreateItem(olMailItem)
> With MailOutLook
> .To = " email@removed "
> .CC = " email@removed "
> 
> Can someone help me with the code, let me know what I need to do to make it 
> work, or point me to a website with code that may do the trick.  There maybe 
> something in the code that I need to change to match up with my setup, but I 
> am clueless when it comes to code.  Maybe there is a good book out there that 
> I can buy?  Please let me know.  
> 
> -- 
> Thank-you!
> Ruth
0
Utf
2/13/2008 3:40:03 PM
Reply:

Similar Artilces:

Downloading Old Emails
Outlook (2003) keeps downloading emails from my account that it has already downloaded. I have changed any settings and I've checked the settings I do have and I can't figure out why it does this. I have it set to retain emails on the server for 7 days. But it keeps downloading the same emails over and over again. At one point, it was close to 150 emails. I went on to the server and deleted them. But it's still doing it for the new emails I received after that. It just started doing this a couple weeks ago. It did it once and then behaved normally until a cou...

setting up multiple email accounts #2
I followed the rules for setting up the pop3 and smtp accounts for multiple mail accounts, but when I access outlook express the additiona account does not recognize the password I've asked it to remember. HELP! KCB <anonymous@discussions.microsoft.com> wrote: > I followed the rules for setting up the pop3 and smtp > accounts for multiple mail accounts, but when I access > outlook express the additiona account does not recognize > the password I've asked it to remember. HELP! Ask in an Outlook Express newsgroup. -- Brian Tillman ...

CRM Internal email lost
Hello I have a problem with emails generated within CRM 3, the emails are not delivered to any internal user's exchange mailbox but they are are beeing delivered outside our domain. Has anybody got a clue on why this is happening or how I can get the mails to be delivered to the Domain users? BR Claudio Any luck on this we are having the same problem. Thank you! "Claudio S" wrote: > Hello > I have a problem with emails generated within CRM 3, the emails are not > delivered to any internal user's exchange mailbox but they are are beeing > delivered outsid...

Contact list not recognized as an address book in outlook email
I installed Outlook 2007 on my computer and imported my addresses from my other computer's Outlook file with excel. The contact list shows all the addresses but I can not access the contact list when I try to send an email. The address book drop down menu does not show anything. I tried to do the "properties" on the contact file, selected the tab "Outlook Address Book" and I am not allowed to check the box to "Show this folder as an address book". I am hoping someone can help me get this resolved. Thank you in advance If you have Contacts in...

Radio Button on opening the form
Hello: I have know how to open the form using command button, but now I want to use Radio Option button to open the form consists of: 1. Show all supplier invoices 2. Show only outstanding invoices 3. Show only paid invoices I have created 3 types of Form using 3 types of query, and now I want to open it by using radio button with the button OK and cancel to open the form. Is there any website providing the sample of Radio button to opent the form. I want to studdy how to write the VBA for that. Thanks in advance. Frank You sure you want the form to open when the radio button is sel...

delayed email #3
I am running server 2k3 and exchange 2k3. When I send out an email message to everyone in our email group I get a message that a few of the people did not receive the message This is an automatically generated Delivery Status Notification THIS IS A WARNING MESSAGE ONLY. YOU DO NOT NEED TO RESENT YOUR MESSAGE Delivery to the following recipients has been delayed. And then it lists a few people that the email has been delayed to. Except the message never gets to these people Any help would be appreciated Mark, A bit more information, if you please. Can you define "eve...

retrieving disgruntled employees email
I currently have an employee who has some email that I need before he leaves. I am afraid when he leaves he will wipe his hard drive and information pertinent to our company will be lost. Is there any way I can get his mailbox store in a format where I can read through it? We have exchange server 2003... Thanks In news:1156938912.420497.277510@b28g2000cwb.googlegroups.com, jborgnini@tippmanngroup.com <jborgnini@tippmanngroup.com> typed: > I currently have an employee who has some email that I need before he > leaves. I am afraid when he leaves he will wipe his hard drive and...

Pop-Up Subform not linking to Main Form
I have a subform - frmLawEnforcement - that is accessed on the main form - frmCorporateSecurity - by clicking on a command button from the main form. The two forms are linked by the CaseIDNumber field. If I place the subform as just an entry from with the main form, the information shows as linking by the CaseIDNumber. When I enter the information into the subform using the command button, the information does not link to the case number. I am not sure what I could be doing wrong. I am an intermediate Access user but am fairly limited on VBA. ABradley, It would help...

Custom Forms
Hello, A fellow administrator recently installed a custom form on our 2003 exchange server. One thing we noticed is that within Outlook 2003 the new form works just great, but we don't see it when logging into exchange via the web interface. Is there a way to get the custom for to be seen there? thanks! Sean no. 6-bit or 32-bit eforms won't display in OWA That isn't to say that you can't customize OWA, nor am I saying that you can't build all sorts of powerful apps on top of the Exchange store (i.e. non-mapi top level hierarchies and custom app-specific schemas,et...

need to edit blank email
I have started working with Outlook 2003, and am exceedingly annoyed that the messages I make are all spaced out at inordinately large intervals. A little bit of knowledge being dangerous, I have fixed Word and Excel to start exactly as I want them to, and would like to do the same with Outlook. When I am done composing a message, I Select All and |Format|Paragraph| and set Before and After to 0 and it collapses the message somewhat, but its annoying to have to keep doing it. Any advice would be gratefully appreciated. -- Regards, P D Sterling Florida, New York USA are you using wo...

Custom Forms 11-04-04
Hi All, When customizing a form in CRM 1.2 I cant find the way to edit the part of the forms that appear when you save a newly opened case. ie. When you save a new case it goes from having just the "information" button on the left hand side to having the activites and notes buttons. I'd like to be able to customise those areas. Is this possible through the CRM interface? If not how do you do it? Thanks All Tom You can add tabs to the left part of the screen via the ISV.Config file. For more information on that, refere to the SDK online. Matt Parks MVP - Microsoft CRM ---...

Multiple Filters in a Form
Hi, I need some help. I have a form based on a query which lists wine in a cellar. I want to allow the users to filter the content on the form by using multiple filters. The following code works well. Private Sub CmdApplyFilter_Click() Dim strWhere As String strWhere = "" Dim strNonZero As String Dim strType As String Dim strYear As String strNonZero = "" strType = "" strYear = "" ' from a check box to show either only current wine in cellar or all wine included that which has been drunk - no bottles in cellar If CheckNonZero = True Then ...

multiple email domain hosting
Is it possible with Exchange 2003 to host multiple email domains in addition to the Active directory integrated domain of the entreprise. To make that server a mail server for other company in pop3 only. I know in Exchange 5.5 it was possible but i did not find anything for routing domains in Exchange 2003 Can exchange 2003 host multiple other email domain without them being in the active directory ? Thanks Yes it can be done, Just make sure you have the DNS MX records pointing to your server/s, then either create a new recipient policy, or modify the default recipient policy. So ...

email to Public folder gets NDR
When I try to send a message to PF I get a NDR and following message in Application log Event Type: Warnin Event Source: MSExchangeTranspor Event Category: Exchange Store Driver Event ID: 32 Date: 31.05.200 Time: 9:50:2 User: N/ Computer: XMAI Description The following call : EcLocallyDeliverMsg2 to the store failed. Error code : 1238 (Message-ID <C8F74733BF2C7E4888545664F83970FC47162D@xmail.1111.ru> will be NDR'd). MDB : 0a07ea5d-c42f-41d6-9b26-1b91ceddf4dd. FID : 1-41. MID : 1-23E6CB. File : . But some other users can send messages without problems.. What does this error code(...

how to transfer email from window xp to window 7
wOULD ANY ONE PLS LET ME KNOW THE STEPS OF HOW I COULD TRANSFER EMAIL MESSAGES FROM OUTLOOK EXPRESS TO WINDOW 7 VERSION You don't do it through Microsoft Word, the topic of this newsgroup. "Dummies for win7" <Dummies for win7@discussions.microsoft.com> wrote in message news:0DF468BF-FEE6-4BDD-8292-38000059C489@microsoft.com... : wOULD ANY ONE PLS LET ME KNOW THE STEPS OF HOW I COULD TRANSFER EMAIL : MESSAGES FROM OUTLOOK EXPRESS TO WINDOW 7 VERSION ...

Yahoo email #2
how do i get my yahoo mail in outlook 2003 Did you bother to read any of the messages here from the last couple of days? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, jmslgn asked: | how do i get my yahoo mail in outlook 2003 On Sun, 30 Apr 2006 21:25:01 -0700, jmslgn <jmslgn@discussions.microsoft.com> wrote: >how do i get my yahoo mail in outlook 2003 If you're using a yahoo.com email address, you need a p...

FORM Calculated Field
I am trying to attempt a simple percentage calculation to provide our sales team for the Opportunity Entity. I have 3 fields 1. estimatedvalue (Est. Revenue)- money 2. closeprobability (Probability) - int 3. dsi_weightedrevenue (Weighted Revenue) - int I need the following calculation to populate my Weighted Revenue (int) field as a percent estimatedvalue X closeprobability = dsi_weightedrevenue I have tried the following script adding it to the OnLoad event of the form being sure to select the "Event is enabled" check box there as well. But after publishing I get nothing but a...

Auditing form on record change
HI, I have a form with multiple fields that I want to track changes to. I was able to create a auditing trail when users click on particular buttons however if they dont click on the buttons the auditing does not occur. What I am wanting to do is to run the audit when a user changes to a new record. I have tried the "on current" and "before update" but they didnt work. Any suggestions? Take a look at what Allen Browne has at http://www.allenbrowne.com/AppAudit.html -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "...

received emails now don't appear in Outlook
Since signing up for Office Outlook 2003, received emails do not appear. I can only access them by going to homepage on the website. Can you help? What do you mean "signing up" for Office? Have you actually installed Office with Outlook & set up your accts in Outlook using the settings from your ISP? If you are referring to Outlook Live from MSN, get help from MSN Support. "hd" wrote: > Since signing up for Office Outlook 2003, received emails do not appear. I > can only access them by going to homepage on the website. Can you help? Thanks for your fee...

Open Excel from a VB6 application then use "Find and Replace" form
Hi all, I need to open Excel from an VB6 application and run the "Find and Replace" form using a value that the VB application has it. I like the "Find and Replace" form better that using regular code because it has an window that opens and shows what are the search results. Any suggestion is welcome!!! You can use the standard built in dialog like this Sub test() Set FindDialog = Application.Dialogs(xlDialogFormulaFind) Results = FindDialog.Show ' results is a boolean MyResults = ActiveCell.Value End Sub I've never been able to figure...

form customization 09-27-05
I work a company that sells products & services on a subscription basis. Handling products in CRM is pretty straightforward, but when we license a service to a customer, it gets hairy. We have put in all of our license fees on an annual basis in the products list so that we can report on annualized revenue to the executives. However, we would like to show monthly and annual costs on our Opportunity form. The "System Calculated" handles the annualized revenue just fine, but what can we do about our the monthly license fee that we use to quote on? Any help is extremely ap...

unable to type in message body of new email
Connecting to Exchange 2003 server via https://mail.mydomain.com/exchange. Running IE 8 and Windows 7. I can login fine and read email, but when i click on the "New" button to create a new email, I am unable to type any text in the message body. Just a small red square in the upper left corner of the message body. I believe this has something to do with DHTML because when i connect with an XP machine running IE8 and create a "New" email, it comes up with the popup bar at the top saying "Click here to add this Dynamic HTML add-on/Active X control"...

Forms or Tables
I'm currently working on a new form, in my table I have combo boxes but some of my questions need to allow users to select more than one answer - how should I go about setting this up? Rach If you have "comboboxes in your table", you probably used the lookup datatype. This can cause you headaches later on because Access stores one thing (the primary key of the looked-up value), but displays something else (the looked-up value). Confused yet?! One way to reduce the confusion, both for you and for anyone who needs to maintain the db after you (or you, after a ...

excel trying to add rows +col
am trying to add rows and clumnes of fig for end of year accounts, am clicking sum, highlighting the row hit return then nothing am i missing some thing Try selecting (highlighting) and then click the auto sum icon -- Don Guillett SalesAid Software dguillett1@austin.rr.com "mowerman" <mowerman@discussions.microsoft.com> wrote in message news:417B9C47-E58E-4A69-9946-EC349684D199@microsoft.com... > am trying to add rows and clumnes of fig for end of year accounts, > am clicking sum, highlighting the row hit return then nothing am i missing > some thing ...

MIssing Email #5
We have an Exchange 2003 clustered environment. I have user's complaining that they are not receiving some emails. We have receive alot of emails during the day and I have a user atleast once a day that says that he/she never received an email. I checked Message Tracking and I don't see the emails there. However other people on exchange that were cc'd on the emails receive the emails. Can you help? are these internal emails? or email from the Internet? "AJ" <mzalj@sbcglobal.net> wrote in message news:OJf4dZ$VFHA.3840@tk2msftngp13.phx.gbl... > We have an...