Error sending email and editing email's body

I have the following function 

Private Sub SendEmail_Click()
Dim strSubject As String
Dim strEmailList As String
Dim strMessage As String
Dim strMessage2 As String


On Error GoTo Err_SendEmail_Click
  strSubject = "Please investigate" & " " & [Ticket #]
  strEmailList = "JohnDoe@emailaddess.com "
  strMessage = Me.Text_Description
  strMessage2 = "Assign to:"
  DoCmd.SendObject acSendNoObject, , acFormatRTF, strEmailList, , , 
strSubject, strMessage, strMessage2
                      
Exit_SendEmail_Click:
    Exit Sub

Err_SendEmail_Click:
    MsgBox Err.Description
    Resume Exit_SendEmail_Click
    


End Sub

First -- I am getting error message: An expression you entered is wrong data 
type for one of the arguments.  How do I fix that?

Is it possible to:
place srtMessage2 in a line below strMessage?
Can I set different font and size in body of my email by adding code to this 
function?  For example can I make body of my email bold for exp?

Thanks a lot


0
Utf
11/10/2007 10:35:01 AM
access 16762 articles. 3 followers. Follow

1 Replies
663 Views

Similar Articles

[PageSpeed] 12

Where you've currently got strMessage2 is supposed to be a boolean field 
indicating whether or not you want to edit the message before sending it. 
Use True (-1) to open the electronic mail application immediately with the 
message loaded, so the message can be edited. Use False (0) to send the 
message without editing it. If you leave this argument blank, the default 
(True) is assumed.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Greg" <Greg@discussions.microsoft.com> wrote in message 
news:8A7C3224-99C8-4AF7-9822-078BA6236566@microsoft.com...
>I have the following function
>
> Private Sub SendEmail_Click()
> Dim strSubject As String
> Dim strEmailList As String
> Dim strMessage As String
> Dim strMessage2 As String
>
>
> On Error GoTo Err_SendEmail_Click
>  strSubject = "Please investigate" & " " & [Ticket #]
>  strEmailList = "JohnDoe@emailaddess.com "
>  strMessage = Me.Text_Description
>  strMessage2 = "Assign to:"
>  DoCmd.SendObject acSendNoObject, , acFormatRTF, strEmailList, , ,
> strSubject, strMessage, strMessage2
>
> Exit_SendEmail_Click:
>    Exit Sub
>
> Err_SendEmail_Click:
>    MsgBox Err.Description
>    Resume Exit_SendEmail_Click
>
>
>
> End Sub
>
> First -- I am getting error message: An expression you entered is wrong 
> data
> type for one of the arguments.  How do I fix that?
>
> Is it possible to:
> place srtMessage2 in a line below strMessage?
> Can I set different font and size in body of my email by adding code to 
> this
> function?  For example can I make body of my email bold for exp?
>
> Thanks a lot
>
> 


0
Douglas
11/10/2007 12:26:05 PM
Reply:

Similar Artilces:

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...

CrystalReportViewer ERROR
I get th�s error when� try to pull reports . CrystalReportViewer "Max processing time/Max records limit reached" "Max processing time/Max records limit reached" ...

Upgrade from 2004 Student & Teacher Edition to 2008 Professional Special Media Edition
Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Hi, I am currently using MS Office 2004 Student & Teacher Edition and would like to upgrade to Office 2008 Special Media Edition. I wonder if i am qualify to purchase the upgrade edition? Yes: http://www.microsoft.com/mac/products/Office2008/shop-now.mspx Regards |:>) Bob Jones [MVP] Office:Mac On 5/8/09 4:03 AM, in article 59b73fa8.-1@webcrossing.caR9absDaxw, "mlok@officeformac.com" <mlok@officeformac.com> wrote: > Version: 2004 > Operating System: Mac OS X 10.5 (Leopard) > Proce...

Don't Want Email Addresses Hyperlinked
Using Excel 2002... Is there any way to have the email address I have in my worksheet remain as simple text? (They typically are blue and want to be "mailtos.") thnx Menu Insert|Hyperlink... Click the Remove Hyperlink button. HTH Kostis Vezerides Tools / AutoCorrect Options.... "Autoformat as you type" tab, uncheck "internet and network paths with hyperlinks" HTH, Bernie MS Excel MVP "phil6666" <phil6666@adelphia.net> wrote in message news:2tn6o194usnq8dtdr7g7nfciv2pd68ccrc@4ax.com... > Using Excel 2002... > > Is there any ...

Strange error message
Hello, I am getting a strange message when I am trying to copy a graph that I use in a payroll document that we use. It contains data and a graph for each employee. It worked just fine for 80% of the document then all of a sudden I started to get this message: "No more new fonts may be applied in this workbook" with an OK button. I can hit the OK button and it will eventually continue on (after multiple clicks). But each time I copy and paste the graph, it gives me this message. I am using Excel 2002 on Win 2000 Pro with all the latest updates and patches available. T...

Cannot send from Windows shortcut or Acrobat
Using Office/Outlook 2003, winxp sp1. Ever since I installed Office 2003 (and I use Outlook 2003 with pop3 email accounts from my website hosting provider), I can't right click a file and "Send To a Mail Recipient" anymore. Nothing happens. I get the same problem in Acrobat 6.0 Professional. It won't let me send a pdf file when viewing it from the file menu like it use to. In both cases, I use to have these capabilities when office xp, or even office 2000 was installed. Any ideas? Thanks! ...

file send to as attachment outlook 2007
When using in word or excel command "send a copy of the document in an e-mail message as an attachment", outlook creats a new e-mail message with the document attached as it should be done. Then I add text in message body, and send the mail. It arrives only with the attachment. The text in message body disappears. This happens only if I work in outlook chache mode. My os is winXp Pro, and my server is SBS 2003. It used to work correct, until somthing happened. Any idea to solve? Thank you Zipi ...

How do I protect my comments from being edited by another user?
I regularly send excel worksheets to a co-worker via e-mail and then she sends it out to others within the company (sales force). There are occasions when she will need to revise it and send it back to me. How do I protect my comments so that they cannot be edited, or can I? I received a worksheet back today that the comments I had entered were changed. These comments are my back-up and I do not want them changed. Can anybody help? highlight the whole sheet format cells / protection / uncheck locked highlight the cells you want protected format cells / protection / check locked tool...

emailing pictures.
what do i change my email settings to so that may send pictures (attachments)??? Version of Outlook? "confused" wrote: > what do i change my email settings to so that may send pictures > (attachments)??? 2003 (so sorry for the delayed response, i turned off my pc, b/c i was so irritated, all other help areas were just as confusing) "Mary" wrote: > Version of Outlook? > > "confused" wrote: > > > what do i change my email settings to so that may send pictures > > (attachments)??? If you are trying to use the Web toolbar to ...

WIN98 Outlook 2000 Distributed Authentication Error
Using WIN98 2nd Edition and Office2000 Outlook. Dial-up connects to internet fine and operates fine, Outlook comes up fine and logs into e-mail server, however just before e-mail is supposed to start downloading I get the following: "An error occurred loading the Distributed Password Authentication Components." After clicking OK, get message box "Microsoft Server Extensions" and message "Unable to read configuration information for Microsoft Personal Web Server error code 1723." Uninstalled Office2000 and totally reinstalled, only to get the same exac...

Authentication Error after restoring SQL databases
Our CRM Development Team messed up our dev server and asked our SQL dba to restore a two day old SQL backup of the MSCRM and METABASE databases. After the restore, the CRM app. is unaccessible through the browser ( Authentication Error. Microsoft CRM could not log you on to the system. Make sure your user record is enabled and that you have been assigned at least one security role. For more information, contact your system administrator. ) Using the Deployment Manager only the License Manager information are visible and neither Server Manager nor User Manager. It seems like the applicat...

Email Help: Sending Outlook email from Excel VBA
Hi All, How do I select a specific property in outlook while sending email from excel? There is an option we can set in outlook outgoing emails call "Voting buttons" in that feature there is a custom option that we can select called "Have replies sent to" its a checkbox. I want it checked when i send an email from excel. Hope i made it clear. Thanks in advance If sending through the Outlook Object Model, use the MailItem.VotingOptions property and MailItem.ReplyRecipients collection. -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSp...

Download email #2
How to download email from Microsoft exchange 2000 to Outlook Express?? without leave a copy at Exchange server. Outlook Express cannot download mail from Exchange. Why are you trying to do so without leaving a copy of the mail on Exchange? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, Edi asked: | How to download email from Microsoft exchange 2000 to | Outlook E...

How do I export email addresses from excel to outlook?
I am trying to do a mail merge using email via outlook. I have 200+ addresses and I'd like to know how to import the addresses into the contacts section of outlook to do the merge from there. I've tried the help part of out look but it comes up saying that the excel file has no named ranges and that I should use excel to name the range of data to be imported. Any help much appreciated. Thanks Mark In outlook select file/import export/ import from another program or file/ and then follow the instructions from the wizard. Why do you want to do the mailmerge from Outlook? You can...

Error 0x80ccc0f
This is becoming a real PIA! I can be using Outlook for hours or only minutes and get this error. When I shut the program down and re-start it, it again works for hrs or minutes. Nothing I do seems to make a difference one way or another. Anyone have a suggestion? Thanks, Larry Outlook 2000 SP-3 Ver. 9.0.0.8954 Webmail Accounts Google Yahoo Mail Plus (default) OS Name Microsoft Windows 2000 Professional Version 5.0.2195 Service Pack 4 Build 2195. Submitted using http://www.outlookforums.com Are you using a Linksys router? Linksys routers have a history of problems with ma...

Credit Card Expiration date error
We are getting an error message for credit cards with expiration dates greater than 2010. Has anyone else seen that? We are currently on RMS 1.2 using PC-Charge. It takes expiration dates through 2009. hi Rick, There is update for 1.2 to 1.3 and also in 1.3 there are patches available kindly download from customer sources this will resolve the issue "Rick@ASP" wrote: > We are getting an error message for credit cards with expiration dates > greater than 2010. Has anyone else seen that? We are currently on RMS 1.2 > using PC-Charge. It takes expiration dates thr...

Invalid sender domain
Your message did not reach some or all of the intended recipients. Subject: RE: Boat Sent: 4/17/2006 11:19 AM The following recipient(s) could not be reached: 'Fahlahas@Surgv.com' on 4/17/2006 11:19 AM 554 Fahlahas@Surgv.com: Recipient address rejected: invalid sender domain Dan Klinge <Yomama@kdkdjkfjdekfjdkfj.com> wrote: > Your message did not reach some or all of the intended recipients. > > Subject: RE: Boat > > Sent: 4/17/2006 11:19 AM > > The following recipient(s) could not be reached: > > 'Fahlahas@Surgv.com' on 4/17/2006 11:19 ...

Problems with Using Word as Email Editor
We use Hummingbird DM 5.1.0.5 for our document and record management. When using this program, it has a problem with Outlook using Word as an Email Editor. When this is turned on, it seems that Outlook opens a different instance of Word. When you try to open or create a word document, you lose the ability to save or print. These features return to normal when you uncheck Word as an Email Editor in Outlook. I have heard that Microsoft was taking this up with Hummingbird to have them fix it. I am just wondering if this was to be resolved, or if it is Hummingbird's problem to ...

Email header in Entourage in Spanish/Italian or Portuguese instead of English
I'm using Entourage 2004 on a ppc mac; OS 10.4.8 is setup in American English, Keyboard is in American English; only my regional settings are for Vancouver, Canada. I was surprised to see the other day that the header of each email I have receive since installing entourage is in a romance language; either Spanish, Italian or Portuguese. I have the latest update for Office 2004. Any tips on how to change that would be appreciated. Regards, Mihai ...

LDAP Error in Outlook 2003
I just upgraded to Office 2003, and now when I go to Outlook to try to send an email, I get an error that says "Can't contact LDAP server (81)". I can eventually send the email, but I get that message several times. -- ------------------------------------------------------------------------- FIGHT BACK AGAINST SPAM! Download Spam Inspector, the Award Winning Anti-Spam Filter http://mail.giantcompany.com You receive a "Can't contact LDAP Directory server (81)" error message when you open the Address Book in Outlook: http://support.microsoft.com/default.as...

Sending from multiple accounts
This has been asked before but there doesn't appear to be an answer, so I thought I would try to keep this alive. I have multiple accounts in Outlook. They all send through the same SMTP server (this problem goes away when multiple SMTP servers are involved). All my outbound e-mail is now going out under the default account name, regardless of the account selected. There is no authentication on my SMTP server, so that option won't work. Has anyone found a solution for this yet? ...

emailing spreadsheet
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Every time I email a spreadsheet as an attachment the recipient cannot open it. I have tried copy and pasting it onto a word doc but apparrently it still doesn't open. What am I doin wrong It's hard to be sure because you don't indicate what *does* happen when the recipient tries to open it, whether these are Mac or Windows users, nor do you disclose any details pertaining to the email specs you or the recipients are using. You may be doing nothing wrong at all. It could be a problem with your ...

Outlook2003 error
Hi all, I am getting an error message when i try to compus a new message...''The messaging interface has returned an unknown error...'' OS=W2K with SP4 Office2003 Please help me Thx in ADV. ...

CRM 4.0 "An error has occurred"
Hi: I did an upgrade from CRM 3.0 to CRM 4.0. First I upgrade Sql2000 to Sql2005 SP2 and then upgrade CRM. I have issue when create new case and tried to assign responsible contact. The application show “An error has occurred”. This form did have a customization in java to filter the contacts to show only the contacts for the account. I removed this customization for the form, but still have the error. I look for any Service Pack or Hot Fix but no found any. Any idea will be appreciated, Regards, -- Jose Valentin Rodriguez MCP-GP MCBMSS-GP Hi Jose, the problem is that you used a (very...

Error 0x800CCC13 in Outlook
Hi, We have several clients using a variety of Outlook versions (2000/XP/2003). Our mailserver is Exchange 5.5 running on a NT4.0 server, all availbale patches applied. All of a sudden clients can't send messages, the get error 0x800CCC13. I've looked up in TechNet and removed IE and OE completely, rebooted and reinstalled IE and OE, because of KB312349. Without any improvement. The problem is gone when removing the MS Exchange Server from the accountlist. Sending and recieving using POP3/SMTP does work. When the Exchange Server is selected but the primary storage location is ...