How to fix: Microsoft Outlook 2013 Bug: Body of email disappears when sending attachment!


I’m sharing this bug (maybe Microsoft considers it a feature?) as well as the (partial) solution so others can be aware that this issue occurs and how to avoid it in the first place.

The problem I discovered was that when sharing a copy of a Microsoft Office document (such as a Word, Excel, or PowerPoint file) using the built-in File > Share > Email > Send as attachment option from within the Office program, the body of the email sent sometimes would disappear! The person receiving my email would get a blank email with just a subject and attachment but no explanation!

After researching the issue, I know why it now happens – and for most folks the fix I found should work in all cases for you. Unfortunately, my own case is more complicated because as a consultant, in addition to my own company’s Microsoft Exchange Server email, I typically have a client’s Microsoft Exchange Server email account added to my laptop’s Outlook account.

The reason this issue occurs is because your Microsoft email account file (typically a .OST file extension) is not set as the default data file. Your default is probably set to an archive .PST file, or in my case, my company of employment’s .OST file but not my client’s .OST file.

Hence, when I try to send an attachment from my client’s email – while I can change the email address I’m sending the email from (it defaults to my company of employment’s email address), the body of the message is not delivered when I hit the send button. It only works if I use my company of employment’s default email address.

To check if your email account is set as the default data file, open up Outlook and navigate to File > Account Settings > Account Settings > Data Files (tab). Ensure that the little black circle with a white check mark (default) is set to the correct .OST file for your exchange account. If it’s not, you need to set it to default by selecting the correct file in the list & clicking the “Set as Default” button.

Unfortunately for me – this means it will continue to work so long as I always use my email for my company of employment, if I want to send the email using my client’s email address, I have to manually save the file & attach to the email using other methods.

Hope this helps you if you are experiencing this issue!

Yosef

How to create an HTML Email in Microsoft Access


A recent client of mine wanted me to make some enhancements to an Access database. The enhancements were all aimed at reducing the workflow. One of the issues they were encountering was at the end of the workflow, the user clicked a button inside the Access database that opened a Word file. This Word file would then walk the user through doing a Mail Merge from within Word to get elements out of the database and then create e-mails in Microsoft Outlook.

The problem was there were quite a few steps involved and at the end of it all, the user had to go back into the database and wipe out some temp tables to be able to restart the process the next day. If they got up from their desk and then came back – it was pretty easy to forget where they were in the workflow and could miss steps.

The client wanted to know if there was a way to do the entire mail merge process inside Access so that everything was automated and the wouldn’t have to go out to Microsoft Word. Piecing together a bunch of different scripts online, I was able to duplicate their Word template as an HTML formatted email, generated from within Access with all the appropriate data elements included in the e-mail.

Here is the outline of the code I used – I have included comments to explain what different parts are doing in the code. If you have specific questions, please let me know in the comments below.

Enjoy!


Private Sub send_mail() 'Substantiate the script

'Create application and mail objects
Dim olApp As Object 
Dim objMail As Object

'Create a query definition and set it to run a specific query.
'Change "Email Query" in square brackets to match query name in your database.
Dim qd As QueryDef
Set qd = CurrentDb.QueryDefs![Email Query]

'Create a record set and run the query defined above
Dim rst As Recordset
Set rst = qd.OpenRecordset()

'The following code loops through each record brought back by the query and
'creates an email for each record.
rst.MoveFirst
Do Until rst.EOF

strElement1 = rst![DataElement1]
strElement2 = rst![DataElement2]

rst.MoveNext

   On Error Resume Next 'Keep going if there is an error
   Set olApp = GetObject(, "Outlook.Application") 'See if Outlook is open

    If Err Then 'Outlook is not open
       Set olApp = CreateObject("Outlook.Application") 'Create a new instance
    End If

    'Create e-mail item
   Set objMail = olApp.CreateItem(olMailItem)
   With objMail
   'Set body format to HTML
     .BodyFormat = olFormatHTML
     .To = "address@yourmailaddress.com"
     '.Cc = "ccaddress@yourmailaddress.com" 


Uncomment out above line to add a carbon copy e-mail address


     '.Bc = "bcaddress@yourmailaddress.com"


Uncomment out above line to add a blind copy e-mail address


    .Subject = "E-mail Message Subject Goes Here"
    .HTMLBody = "<!DOCTYPE html>"
    .HTMLBody = .HTMLBody & "<html><head><body>" 


You can keep building out the html using the same syntax of adding .HTMLBody from the line above & tacking on whatever is new:


    .HTMLBody = .HTMLBody & "<h1><u>This is an example header line</u></h1>"
    .HTMLBody = .HTMLBody & "<h2><u>This is an example header 2 line</u></h2>"
    .HTMLBody = .HTMLBody & "<table>"
    .HTMLBody = .HTMLBody & "<tr><td>Element 1</td><td>"& strElement1 & "</td></tr>"
    .HTMLBody = .HTMLBody & "<tr><td>Element 2</td><td>"& strElement2 &"</td></tr>"
    .HTMLBody = .HTMLBody & "</table>"
    .HTMLBody = .HTMLBody & "<br><br><img height=""20"" width=""684"" border=""0""
    src=""C:\Users\USERNAME\Desktop\image001.png"" style=""width: 684px; height: 20px;""/img>"


Above is an example of adding in an image to the Email HTML


    .HTMLBody = .HTMLBody & "<br><br>Email Customer Service at 
    <a href=""mailto:Support@youremailaddress.com"">Support@youremailaddress.com</a>"


Above is an example of adding a URL to the Email HTML


    .HTMLBody = .HTMLBody & "<br>or call 1-800-YOUR NUMBER HERE (Mon – Fri, 8am - 8pm Eastern)."
    .HTMLBody = .HTMLBody & "</body></html>"


By ucommentiong out the "Send" command below, emails will be sent out without allowing the user to review them first. Using the "Display" command brings up all the emails as draft emails and allows the user to review them prior to sending them.


     '.send
     .Display
   End With
Loop

End Sub

Outlook: Deleting an E-mail Account (3 of 3)


Note: These instructions are for Outlook 2010. The process is similar in other versions of Outlook, the menus are just different.

As a consultant, I move from client to client on a regular basis. When I leave a client, I want to save my e-mails and archive them in case I ever have to look back at them.

This is part three of a three-part series where I walk you through:

  1. Exporting an entire e-mail account
  2. Opening a .PST (archive) file
  3. Deleting an old e-mail account

Part 3: How to delete an entire e-mail account in Outlook.

CAUTION! Once you delete an account, there is no way to recover it! Please ensure that you have backed up all your information before doing this!

  1. In Outlook, click on the “File” tab.
  2. Click the “Account Settings” button and select the “Account Settings…” option in the drop down menu.
  3. Highlight the e-mail account you wish to permanently delete and click the “Remove” button.
  4. Follow the prompts to confirm that you want to remove it.

Let me know if you have any questions!

Outlook: Opening a PST file (2 of 3)


Note: These instructions are for Outlook 2010. The process is similar in other versions of Outlook, the menus are just different.

As a consultant, I move from client to client on a regular basis. When I leave a client, I want to save my e-mails and archive them in case I ever have to look back at them.

This is part two of a three-part series where I walk you through:

  1. Exporting an entire e-mail account
  2. Opening a .PST (archive) file
  3. Deleting an old e-mail account

Part 2: How to open an Outlook archive .PST file.

  1. In Outlook, click on the “File” tab.
  2. Select “Open” from the menu on the left.
  3. Select “Open Outlook Data File” option in the list on the right.
  4. Browse to your saved .PST file & click the “Open” button.
  5. The .PST file will show up in the bottom left of your account folder list on your main “Home” tab view.

Let me know if you have any questions!

Outlook: Exporting your E-mail Account (1 of 3)


Note: These instructions are for Outlook 2010. The process is similar in other versions of Outlook, the menus are just different.

As a consultant, I move from client to client on a regular basis. When I leave a client, I want to save my e-mails and archive them in case I ever have to look back at them.

This is part one of a three-part series where I walk you through:

  1. Exporting an entire e-mail account
  2. Opening a .PST (archive) file
  3. Deleting an old e-mail account

Part 1: How to export an entire e-mail account to an Outlook archive .PST file.

  1. To do this, in Outlook, click on the “File” tab.
  2. Select “Options” from the menu on the left.
  3. Select “Advanced” from the menu on the left.
  4. Select the “Export” option in the list on the right.
  5. Highlight the “Export to file” option & then click the “Next” button.
  6. Highlight the “Outlook Data File (.PST)” option & then click the “Next” button.
  7. Highlight the E-mail account folder that you want to archive & then click the “Next” button.
  8. Browse to where you want to save the file on your hard drive using the “Browse” button.
  9. In the options section, because this is the first time you’re creating this file, it really doesn’t matter which option you select. Click the “Finish” button.

You will now have a .PST file that contains your entire Manheim account e-mail.

Let me know if you have any questions!