我不是能夠測試這個,所以請讓我們知道它是否有效。
替換爲「我的GAL DistList名稱」與通訊組列表的名稱,因爲它出現在你的地址簿。和最後一行代碼顯然需要與您要添加到DL中的聯繫信息進行更新。
Sub AddtoDL()
Dim ns As Outlook.NameSpace
Dim al As Outlook.AddressList
Dim aes As Outlook.AddressEntries
Dim ae As Outlook.AddressEntry
Dim newae As Outlook.AddressEntry
Set ns = session
Set al = ns.AddressLists("Global Address List")
Set aes = al.AddressEntries
Set ae = aes.item("My GAL DistList Name")
Set newae = ae.Members.Add("SMTP", "Jimmy Pena", "[email protected]")
End Sub
(從http://oreilly.com/catalog/cdomapi/chapter/ch07.html部分來源)
它只是看看現在。下週試試吧。感謝您的信息。 –