OutlookBarShortcut.SetIcon-Methode (Outlook)

Legt das Symbol für die angegebene Verknüpfung im Verknüpfungsbereich fest.

Syntax

Ausdruck. SetIcon( _Icon_ )

Ausdruck Eine Variable, die ein OutlookBarShortcut-Objekt darstellt.

Parameter

Name Erforderlich/Optional Datentyp Beschreibung
Icon Erforderlich Variant Der Pfad des Symbols.

Beispiel

Im folgenden Beispiel für Microsoft Visual Basic for Applications (VBA) wird eine Gruppe namens MicrosoftSites erstellt und der Microsoft Network-Webseite eine Verknüpfung hinzugefügt. Then it sets the icon of the shortcut to the icon image MSN.ico located on the user's computer. The example assumes that this icon exists in the specified location.

 Sub CreateMSNShortcutWithIcon() 
 
 Dim exp As Outlook.Explorer 
 
 Dim pans As Outlook.Panes 
 
 Dim bpan As Outlook.OutlookBarPane 
 
 Dim bgrps As Outlook.OutlookBarGroups 
 
 Dim bgrp As Outlook.OutlookBarGroup 
 
 Dim bscs As Outlook.OutlookBarShortcuts 
 
 Dim bsc As Outlook.OutlookBarShortcut 
 
 Dim bsc2 As Outlook.OutlookBarShortcut 
 
 
 
 Set exp = Application.ActiveExplorer 
 
 Set pans = exp.Panes 
 
 Set bpan = pans.Item("OutlookBar") 
 
 Set bgrps = bpan.Contents.Groups 
 
 Set bgrp = bgrps.Add("MicrosoftSites") 
 
 Set bscs = bgrp.Shortcuts 
 
 Set bsc = bscs.Add("https://www.msn.com", "MSN Home Page") 
 
 bsc.SetIcon "C:\MSN.ico" 
 
End Sub

Siehe auch

OutlookBarShortcut-Objekt

Support und Feedback

Haben Sie Fragen oder Feedback zu Office VBA oder zu dieser Dokumentation? Unter Office VBA-Support und Feedback finden Sie Hilfestellung zu den Möglichkeiten, wie Sie Support erhalten und Feedback abgeben können.