Solved

MS Access 2007 / MS SharePoint problem with Outlook e-mail

Posted on 2011-03-24
6
215 Views
Last Modified: 2012-05-11
I have recently split my MS Access database, with the backend being on SharePoint.  Everything seems to work really well.  Some minor issues, but no show stoppers.  Well, that's what I originally thought anyway.

Here's the problem:

I have a button on my MS Access form that takes the information from the fields on the Access form and creates a formatted e-mail message.  The VB code uses .HtmlBody for the body of the e-mail.  When I hit the button everything works perfectly.  The information is taken from the form and populated on to the Outlook e-mail just like it should; however, when I send the e-mail, all the data is stripped and left with some of the html formatting code.  It is very strange.  The information is there in the e-mail, but when I hit the send button, I look at the sent e-mail and the information is gone.

Even stranger is that the Subject line of the e-mail is unaffected.  It works perfectly fine.

If anyone has encountered this problem or can point me in the right direction I would be extremely thankful.
0
Comment
Question by:cgraziano
  • 3
6 Comments
 
LVL 84
ID: 35212386
How are you creating the .HTMLBody string? You should try building a Variable and using that:

Dim sBody As String

sBody = WhateverMethodYouUseToBuildHTMLBody

Now use the sBody variable instead of .HTMLBody
0
 

Author Comment

by:cgraziano
ID: 35212597
Thanks for the suggestion.  Unfortunatley, I will not have access to my database until tomorrow morning.  I will try this out first thing.

One question though.  I used .HtmlBody because I needed the e-mail to be formatted with bolding and underlining.  Will I be able to accomplish that using the sBody string method you mentioned?

But, how does this explain Outlook stripping the e-mail of all the information?  Like I said, the e-mail is created with all the appropriate data and in the correct format, but is blank after being sent.  I originally thought it was a Outlook problem, but then started to think it may have something to do with the SharePoint permissions.  I used the same exact code before I split the database between Access and SharePoint and everything worked fine.  The problem didn't start until I started using SharePoint as the backend.

I was also just thinking about playing with Outlooks external editor settings under the e-mail options, mail formatter.  Maybe switching it to use MS Word as the default e-mail editor for all new e-mails.  Any thoughts?

Thanks
0
 

Author Comment

by:cgraziano
ID: 35216902
Ok.  I found out what the problem was.  It has soemthing to do with the HTML message formatter.  When I switch the e-mail to Rich Text it is sent perfectly.  So, then I went and changed the Mail Format for the MS Outlook 2007 inbox from HTML to Rich Text, but when I use my Access form to create the e-mail it changes the message format back to HTML.  I think since I am using the .HtmlBody in the VB code it is automatically converting it back to HTML.  Rather than relying on the user to change the message format for every message, I would like to create a way to have it done automatically.  I can think of only two options:

Change the .HtmlBody in the VB code.  I tried using the sBody method suggested by LMS but it did not like the html code code used in the body, and produced a blank message.  Instead of using .HtmlBody or .Body is there a rich text version I could use?

Or, is there a code I code put at the end of the e-mail code that will automatically convert the e-mail to Rich Text after the information has been added to the e-mail?

Any suggestions would be very helpful.  

Thank you  
0
 

Author Comment

by:cgraziano
ID: 35217082
I ended up using a .BodyFormat = olFormatRichText at the end of my e-mail code to switch the e-mail back to Rich Text.  I have to do a little more testing to ensure none of the formatting was lost, but initial indications look good.
0
 

Accepted Solution

by:
ee_auto earned 0 total points
ID: 36260796
Question PAQ'd and stored in the solution database.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now