I am trying to import a Sharepoint list into a BCC field of an Outlook oft email template.
When user will click on the sharepoint linked oft email template, a new email message will open, BCC field will be populated from an existing sharepoint list.
I dont know if my approach is right. I am pretty new to working with Sharepoint. Maybe there is a better solution. But what I have comue up with so far, is create an oft file, put some VBA in it. Here is the VBA I found/made:
Set myItem = Application.CreateItem(olMailItem)
Dim recipientBCC As Outlook.Recipient
Dim strSPServer As String
Const SERVER As String = "collab/sites/cdo/"
Const listName As String = "{BC213CF4-F60C-4BA2-9110-497EC189F8E3}"
Const viewName As String = "{49dbc46f-4058-4d13-beaf-0c56211398fe}"
' The SharePoint server URL pointing to
' the SharePoint list to import into Excel.
strSPServer = "http://" & SERVER & "/_vti_bin"
Set objMyList = myItem.Recipients.ListObjects.Add(xlSrcExternal, _
Array(strSPServer, listName, viewName))
objMyList.Type = olBCC
End Sub
Not certain from that point

0 commentaires:
Enregistrer un commentaire