DocumentBase.MailMergeWizardSendToCustom Kejadian
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Terjadi ketika tombol kustom diklik pada langkah enam panduan Penggabungan Surat.
public:
event EventHandler ^ MailMergeWizardSendToCustom;
public event EventHandler MailMergeWizardSendToCustom;
member this.MailMergeWizardSendToCustom : EventHandler
Public Custom Event MailMergeWizardSendToCustom As EventHandler
Jenis Acara
Contoh
Contoh kode berikut menjalankan penggabungan saat Anda mengklik tombol tujuan kustom. Contoh ini mengasumsikan bahwa Anda memiliki akses ke tombol tujuan kustom. Untuk menggunakan contoh ini, jalankan dari ThisDocument
kelas dalam proyek tingkat dokumen.
private void DocumentMailMergeWizardSendToCustom()
{
this.MailMergeWizardSendToCustom += new
EventHandler(ThisDocument_MailMergeWizardSendToCustom);
}
void ThisDocument_MailMergeWizardSendToCustom(object sender, EventArgs e)
{
this.MailMerge.ShowSendToCustom = "Custom Destination";
this.MailMerge.Destination = Microsoft.Office.Interop
.Word.WdMailMergeDestination.wdSendToNewDocument;
this.MailMerge.Execute(ref missing);
}
Private Sub DocumentMailMergeWizardSendToCustom()
AddHandler Me.MailMergeWizardSendToCustom, AddressOf ThisDocument_MailMergeWizardSendToCustom
End Sub
Private Sub ThisDocument_MailMergeWizardSendToCustom(ByVal sender As Object, ByVal e As EventArgs)
Me.MailMerge.ShowSendToCustom = "Custom Destination"
Me.MailMerge.Destination = Microsoft.Office.Interop.Word.WdMailMergeDestination. _
wdSendToNewDocument
Me.MailMerge.Execute()
End Sub
Keterangan
ShowSendToCustom Gunakan properti untuk membuat tombol kustom pada langkah keenam Panduan Penggabungan Surat.