Sdílet prostřednictvím


DocumentBase.MailMergeDataSourceLoad – událost

Vyvolá se při načtení zdroje dat pro hromadnou korespondenci.

Obor názvů:  Microsoft.Office.Tools.Word
Sestavení:  Microsoft.Office.Tools.Word.v4.0.Utilities (v Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Syntaxe

'Deklarace
Public Event MailMergeDataSourceLoad As EventHandler
public event EventHandler MailMergeDataSourceLoad

Příklady

Následující příklad zobrazí zprávu při načtení zdroje dat pro hromadnou korespondenci.Chcete-li tento příklad použít, spusťte jej ze třídy ThisDocument v projektu na úrovni dokumentu.

Private Sub DocumentMailMergeDataSourceLoad()
    AddHandler Me.MailMergeDataSourceLoad, AddressOf ThisDocument_MailMergeDataSourceLoad
End Sub

Private Sub ThisDocument_MailMergeDataSourceLoad(ByVal sender As Object, ByVal e As EventArgs)
    Dim index As Object = 1
    MessageBox.Show(Me.MailMerge.DataSource.DataFields.Item(index).Value & _
        " is loading.")
End Sub
private void DocumentMailMergeDataSourceLoad()
{
    this.MailMergeDataSourceLoad += new EventHandler(ThisDocument_MailMergeDataSourceLoad);
}

void ThisDocument_MailMergeDataSourceLoad(object sender, EventArgs e)
{
    object index = 1;
    MessageBox.Show(this.MailMerge.DataSource.DataFields.get_Item(ref index).Value
         + " is loading.");
}

Zabezpečení rozhraní .NET Framework

Viz také

Referenční dokumentace

DocumentBase Třída

Microsoft.Office.Tools.Word – obor názvů