Ok I got a script which we been using on Outlook 2010 with no problems, I have now try to get it working on a Outlook 2013 and it doesn't appear to detect it.
This is the steps used to create this, so any ideas please give me a hand
Create a personal Digital Signature
C:\Program Files\Microsoft Office\Office12
Run Selfcert.exe
Choose a name for your signature
OK
Enable warning for all Macros
Open Outlook
Tools > Macro > Security
Tick Warnings for all macros
Close Outlook
Create the VBA code and digitally sign it
Open Outlook
Alt + F11 to open the editor
Navigate Project1 on the upper left, double click ThisOutlookSession
Paste in the following code into the right hand window
Private Sub Application_ItemSend(ByVal Item As Object, _
Cancel As Boolean)
Dim objNS As NameSpace
Dim objFolder As MAPIFolder
Set objNS = Application.GetNamespace("MAPI")
Set objFolder = objNS.PickFolder
If TypeName(objFolder) <> "Nothing" And _
IsInDefaultStore(objFolder) Then
Set Item.SaveSentMessageFolder = objFolder
End If
Set objFolder = Nothing
Set objNS = Nothing
End Sub
Public Function IsInDefaultStore(objOL As Object) As Boolean
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objInbox As Outlook.MAPIFolder
On Error Resume Next
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objInbox = objNS.GetDefaultFolder(olFolderInbox)
Select Case objOL.Class
Case olFolder
If objOL.StoreID = objInbox.StoreID Then
IsInDefaultStore = True
End If
Case olAppointment, olContact, olDistributionList, _
olJournal, olMail, olNote, olPost, olTask
If objOL.Parent.StoreID = objInbox.StoreID Then
IsInDefaultStore = True
End If
Case Else
MsgBox "This function isn't designed to work " & _
"with " & TypeName(objOL) & _
" items and will return False.", _
, "IsInDefaultStore"
End Select
Set objApp = Nothing
Set objNS = Nothing
Set objInbox = Nothing
End Function
File > Save VbaProject.OTM
Add a Signature
Tools > Digital Signature > Choose
Choose the signature you created
OK
File > Save VbaProject.OTM
File > Close and return to Outlook
Establish yourself as a trusted publisher
Close Outlook
Open Outlook
A dialogue box will appear, Outlook has detected macros
Select ‘Trust all documents from this publisher’
When you open Outlook at tthe end it doesn't appear to detect the system.
This is the steps used to create this, so any ideas please give me a hand
Create a personal Digital Signature
C:\Program Files\Microsoft Office\Office12
Run Selfcert.exe
Choose a name for your signature
OK
Enable warning for all Macros
Open Outlook
Tools > Macro > Security
Tick Warnings for all macros
Close Outlook
Create the VBA code and digitally sign it
Open Outlook
Alt + F11 to open the editor
Navigate Project1 on the upper left, double click ThisOutlookSession
Paste in the following code into the right hand window
Private Sub Application_ItemSend(ByVal Item As Object, _
Cancel As Boolean)
Dim objNS As NameSpace
Dim objFolder As MAPIFolder
Set objNS = Application.GetNamespace("MAPI")
Set objFolder = objNS.PickFolder
If TypeName(objFolder) <> "Nothing" And _
IsInDefaultStore(objFolder) Then
Set Item.SaveSentMessageFolder = objFolder
End If
Set objFolder = Nothing
Set objNS = Nothing
End Sub
Public Function IsInDefaultStore(objOL As Object) As Boolean
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objInbox As Outlook.MAPIFolder
On Error Resume Next
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objInbox = objNS.GetDefaultFolder(olFolderInbox)
Select Case objOL.Class
Case olFolder
If objOL.StoreID = objInbox.StoreID Then
IsInDefaultStore = True
End If
Case olAppointment, olContact, olDistributionList, _
olJournal, olMail, olNote, olPost, olTask
If objOL.Parent.StoreID = objInbox.StoreID Then
IsInDefaultStore = True
End If
Case Else
MsgBox "This function isn't designed to work " & _
"with " & TypeName(objOL) & _
" items and will return False.", _
, "IsInDefaultStore"
End Select
Set objApp = Nothing
Set objNS = Nothing
Set objInbox = Nothing
End Function
File > Save VbaProject.OTM
Add a Signature
Tools > Digital Signature > Choose
Choose the signature you created
OK
File > Save VbaProject.OTM
File > Close and return to Outlook
Establish yourself as a trusted publisher
Close Outlook
Open Outlook
A dialogue box will appear, Outlook has detected macros
Select ‘Trust all documents from this publisher’
When you open Outlook at tthe end it doesn't appear to detect the system.