Hello,
Is there any way I can apply the code below to a shared sub folder in outlook? It works for my personal box but not for shared folders. The location of the folder shared sub folder is \\[email protected]\Managed Folders\Archive\UK & Ireland. It's called "controls".
Private WithEvents oItems As Outlook.Items
Private Sub Application_Startup()
Const MyFolder = "Controls" ' <-- Change to suit
On Error Resume Next
With Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
Set oItems = .Folders(MyFolder).Items
If Err Then
.Folders.Add MyFolder
Set oItems = .Folders(MyFolder).Items
End If
End With
On Error GoTo 0
End Sub
Private Sub oItems_ItemAdd(ByVal Item As Object)
Static N
If IsNumeric(N) Then N = N + 1
N = InputBox("Type ID to be added to the end of the Subject", "Subject ID", N)
With Item
.Subject = .Subject & " " & N
.Save
End With
End Sub
Bookmarks