I
info
This macro should add specified categorie to each email I have
selected, but nothing happens. What could be wrong?
/Marcus
----------------------------------------
Sub SetCategories()
' Set "Local" Category to email
Dim myItem As Object
Dim myOlExp As Outlook.Explorer
Dim myOlSel As Outlook.Selection
NewCategories = InputBox("Specify Category new categorie", "Specify
Category...", "Miscellaneous")
On Error Resume Next
'Work on selected items
Set myOlExp = myOlApp.ActiveExplorer
Set myOlSel = myOlExp.Selection
'For all items do...
For Each myItem In myOlSel
'Set categories
myItem.Categories = myItem.Categories & ";" & NewCategories
myItem.Save
Next
'Free variables
Set myItem = Nothing
Set myOlApp = Nothing
Set myOlExp = Nothing
Set myOlSel = Nothing
End Sub
----------------------------------------
selected, but nothing happens. What could be wrong?
/Marcus
----------------------------------------
Sub SetCategories()
' Set "Local" Category to email
Dim myItem As Object
Dim myOlExp As Outlook.Explorer
Dim myOlSel As Outlook.Selection
NewCategories = InputBox("Specify Category new categorie", "Specify
Category...", "Miscellaneous")
On Error Resume Next
'Work on selected items
Set myOlExp = myOlApp.ActiveExplorer
Set myOlSel = myOlExp.Selection
'For all items do...
For Each myItem In myOlSel
'Set categories
myItem.Categories = myItem.Categories & ";" & NewCategories
myItem.Save
Next
'Free variables
Set myItem = Nothing
Set myOlApp = Nothing
Set myOlExp = Nothing
Set myOlSel = Nothing
End Sub
----------------------------------------