Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2011-03-24
6
232 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

809 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