I'm trying to write some VBA to move the conversation I have selected in Outlook to a PST file named PSTFileName. I have the code below based on some other research but I keep getting a "Compile Error Method or data member not found" and it is erroring on the OlSelectionContents item.
Any help at all would be greatly appreciated.
Sub MoveSelectedConversationToPSTFolder(PSTFileName As String)
Set Conversations = ActiveExplorer.Selection.GetSelection(Outlook.OlSelectionContents.olConversationHeaders)
For Each Header In Conversations
Set Items = Header.GetItems()
For I = 1 To Items.Count
Items(I).UnRead = False
Items(I).Move PSTFileName
Next I
Next Header
End Sub