Document.MailMergeWizardSendToCustom Evento

Definizione

Viene generato quando si sceglie il pulsante personalizzato al passaggio sei della Creazione guidata Stampa unione.

public:
 event EventHandler ^ MailMergeWizardSendToCustom;
event EventHandler MailMergeWizardSendToCustom;
member this.MailMergeWizardSendToCustom : EventHandler 
Event MailMergeWizardSendToCustom As EventHandler 

Tipo evento

Esempio

Nell'esempio di codice seguente viene eseguita un'unione quando si fa clic sul pulsante di destinazione personalizzata. In questo esempio si presuppone che si abbia accesso a un pulsante di destinazione personalizzato. Questo esempio riguarda un componente aggiuntivo a livello di applicazione.

private void DocumentMailMergeWizardSendToCustom()
{
    Document vstoDoc = Globals.Factory.GetVstoObject(this.Application.ActiveDocument);
    vstoDoc.MailMergeWizardSendToCustom += new 
        EventHandler(ThisDocument_MailMergeWizardSendToCustom);
}

void ThisDocument_MailMergeWizardSendToCustom(object sender, EventArgs e)
{
    Document vstoDoc = Globals.Factory.GetVstoObject(this.Application.ActiveDocument);
    vstoDoc.MailMerge.ShowSendToCustom = "Custom Destination";
    vstoDoc.MailMerge.Destination = Microsoft.Office.Interop
        .Word.WdMailMergeDestination.wdSendToNewDocument;
    vstoDoc.MailMerge.Execute(ref missing);
}
Private Sub DocumentMailMergeWizardSendToCustom()
    Dim vstoDoc As Document = Globals.Factory.GetVstoObject(Me.Application.ActiveDocument)
    AddHandler vstoDoc.MailMergeWizardSendToCustom, AddressOf ThisDocument_MailMergeWizardSendToCustom
End Sub

Private Sub ThisDocument_MailMergeWizardSendToCustom(ByVal sender As Object, ByVal e As EventArgs)
    Dim vstoDoc As Document = Globals.Factory.GetVstoObject(Me.Application.ActiveDocument)
    vstoDoc.MailMerge.ShowSendToCustom = "Custom Destination"
    vstoDoc.MailMerge.Destination = Microsoft.Office.Interop.Word.WdMailMergeDestination. _
        wdSendToNewDocument
    vstoDoc.MailMerge.Execute()
End Sub

Commenti

Utilizzare la ShowSendToCustom proprietà per creare un pulsante personalizzato nel sesto passaggio della Creazione guidata stampa unione.

Si applica a