Partager via


MicrosoftMailDestinationOptions Classe

Indique les propriétés permettant d'extraire et de définir des options lors de l'exportation vers Microsoft Mail.

Pour obtenir la liste de tous les membres de ce type, voir les membres de la classe MicrosoftMailDestinationOptions.

System.Object
   CrystalDecisions.Shared.ExportDestinationOptions
      MicrosoftMailDestinationOptions

[Visual Basic]

Public Class MicrosoftMailDestinationOptions
   Implements ICloneable

[C#]

public class MicrosoftMailDestinationOptions : ICloneable

Remarques

Pour réussir l'exportation vers Microsoft Mail, le système doit d'abord charger mapisp32.dll. Mapisp32.dll peut être chargé en exécutant le client de messagerie, par exemple Microsoft Outlook.

Exemple

[VJ#]

      static void ExportToMSMail(String toList, String subject, String message,
         String ccList, String user, String password)
      {
         PdfRtfWordFormatOptions pdfOpts =
            ExportOptions.CreatePdfRtfWordFormatOptions();
         MicrosoftMailDestinationOptions mailOpts =
            ExportOptions.CreateMicrosoftMailDestinationOptions();
         ExportOptions exportOpts = new ExportOptions();
      
         pdfOpts.set_UsePageRange( false );
         exportOpts.set_ExportFormatOptions( pdfOpts );
      
         mailOpts.set_MailCCList( ccList );
         mailOpts.set_MailMessage( message );
         mailOpts.set_MailSubject( subject );
         mailOpts.set_MailToList( toList );
         mailOpts.set_Password( password );
         mailOpts.set_UserName( user );
         exportOpts.set_ExportDestinationOptions( mailOpts );
      
         exportOpts.set_ExportDestinationType( 
            ExportDestinationType.MicrosoftMail);
         exportOpts.set_ExportFormatType(
            ExportFormatType.PortableDocFormat);
      
         Report.Export(exportOpts);
      }
      
[Visual Basic]

      Public Sub ExportToMSMail(ByVal toList As String, ByVal subject As String, ByVal message As String, _
         ByVal ccList As String, ByVal user As String, ByVal password As String)
      
         Dim pdfOpts As PdfRtfWordFormatOptions = _
            ExportOptions.CreatePdfRtfWordFormatOptions()
         Dim mailOpts As MicrosoftMailDestinationOptions = _
            ExportOptions.CreateMicrosoftMailDestinationOptions()
         Dim exportOpts As ExportOptions = New ExportOptions
      
         pdfOpts.UsePageRange = False
         exportOpts.ExportFormatOptions = pdfOpts
      
         mailOpts.MailCCList = ccList
         mailOpts.MailMessage = message
         mailOpts.MailSubject = subject
         mailOpts.MailToList = toList
         mailOpts.Password = password
         mailOpts.UserName = user
         exportOpts.ExportDestinationOptions = mailOpts
      
         exportOpts.ExportDestinationType = _
            ExportDestinationType.MicrosoftMail
         exportOpts.ExportFormatType = _
            ExportFormatType.PortableDocFormat
      
         Report.Export(exportOpts)
      End Sub
      
[C++]

      static void ExportToMSMail (String* toList, String* subject, String* message,
         String* ccList, String* user, String* password)
      {
         PdfRtfWordFormatOptions* pdfOpts =
            ExportOptions::CreatePdfRtfWordFormatOptions();
         MicrosoftMailDestinationOptions* mailOpts =
            ExportOptions::CreateMicrosoftMailDestinationOptions();
         ExportOptions* exportOpts = new ExportOptions();
      
         pdfOpts->UsePageRange = false;
         exportOpts->ExportFormatOptions = pdfOpts;
      
         mailOpts->MailCCList = ccList;
         mailOpts->MailMessage = message;
         mailOpts->MailSubject = subject;
         mailOpts->MailToList = toList;
         mailOpts->Password = password;
         mailOpts->UserName = user;
         exportOpts->ExportDestinationOptions = mailOpts;
      
         exportOpts->ExportDestinationType =
            ExportDestinationType::MicrosoftMail;
         exportOpts->ExportFormatType =
            ExportFormatType::PortableDocFormat;
      
         Report->Export (exportOpts);
      };
      
[C#]

      static void ExportToMSMail(string toList, string subject, string message,
         string ccList, string user, string password)
      {
         PdfRtfWordFormatOptions pdfOpts =
            ExportOptions.CreatePdfRtfWordFormatOptions();
         MicrosoftMailDestinationOptions mailOpts =
            ExportOptions.CreateMicrosoftMailDestinationOptions();
         ExportOptions exportOpts = new ExportOptions();
      
         pdfOpts.UsePageRange = false;
         exportOpts.ExportFormatOptions = pdfOpts;
      
         mailOpts.MailCCList = ccList;
         mailOpts.MailMessage = message;
         mailOpts.MailSubject = subject;
         mailOpts.MailToList = toList;
         mailOpts.Password = password;
         mailOpts.UserName = user;
         exportOpts.ExportDestinationOptions = mailOpts;
      
         exportOpts.ExportDestinationType =
            ExportDestinationType.MicrosoftMail;
         exportOpts.ExportFormatType =
            ExportFormatType.PortableDocFormat;
      
         Report.Export(exportOpts);
      }
      

Configuration requise

Espace de noms CrystalDecisions.Shared

Assembly CrystalDecisions.Shared (CrystalDecisions.Shared.dll)

Voir aussi

MicrosoftMailDestinationOptions Membres | CrystalDecisions.Shared Espace de noms

**

©2005 Business Objects SA. Tous droits réservés.

Business Objects SA.
http://www.france.businessobjects.com/
Services de support
http://www.businessobjects.com/support/