1453725 - Error when exporting to MAPI on Windows 7

SAP Knowledge Base Article - Public

1453725 - Error when exporting to MAPI on Windows 7

Symptom

  • Error: CrystalDecisions.CrystalReports.Engine.InvalidArgumentException: Not a valid export option
  • Exporting a Crystal Report to MAPI
  • Using the Crystal Reports Designer or a custom .NET application (Windows or web)

Environment

  • Crystal Reports 2008 SP2
  • Windows 7
  • Outlook 2007 Client

Cause

Windows 7 does not support simple MAPI API's

Resolution

  • The issue has been submitted for a resolution.
  • Tracking number is ADAPT01330389
  • A work-around has been identified as described below
  • Note: This is a work-around only and may result in unintended consequences
  • Copy the MAPI32.DLL into a temporary directory
  • Create a batch file and save the file to the above temporary directory
  • The contents of the batch file:
@echo off
takeown /f c:\windows\system32\mapi32.dll
cacls c:\windows\system32\mapi32.dll /G %USERNAME%:F
ren c:\windows\system32\mapi32.dll c:\windows\system32\mapi32.dll.ORIGINAL
copy mapi32.dll c:\windows\system32\mapi32.dll
 
if NOT '%PROCESSOR_ARCHITECTURE%'=='AMD64' goto END
takeown /f c:\windows\sysWOW64\mapi32.dll
cacls c:\windows\sysWOW64\mapi32.dll /G %USERNAME%:F
ren c:\windows\sysWOW64\mapi32.dll c:\windows\sysWOW64\mapi32.dll.ORIGINAL
copy mapi32.dll c:\windows\sysWOW64\mapi32.dll
:END
  • Run the batch file with Administrator privileges from a Command Prompt

Keywords

Forum thread , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports XI R2