Listing 1
OutlookSession sess = new OutlookSession();
EmailAccount acct = sess.EmailAccounts["PersonalAccount"];
EmailMessage msg = new EmailMessage();
msg.BodyText = "Quick, buy stock in Microsoft!";
Recipient rcp = new Recipient("Ed Broker", "e@trade.com");
msg.To.Add(rcp);
msg.Send(acct);
Listing 2
Dim oDlg As New ChooseContactDialog()
oDlg.ChooseContactOnly = True
oDlg.HideNew = True
oDlg.Title = "Choose Author"
If oDlg.ShowDialog() = Windows.Forms.DialogResult.OK Then
MsgBox(oDlg.SelectedContactName)
End If
Listing 3
Dim o As New SelectPictureDialog()
o.InitialDirectory = _ System.IO.Path.GetDirectoryName
(Assembly.GetExecutingAssembly().GetName().CodeBase)
o.LockDirectory = True
o.Title = "Select Author Headshot"
If oDlg.ShowDialog() = Windows.Forms.DialogResult.OK Then
MsgBox(o.FileName)
End If