T
toocool
Hi,
I'm having three problems with a macro in Outlook.
First of all it steps out of "for each" after two steps, whereas it
should do more... (depending on the number of messages)
The second thing is it works when I run it from VBA, but when I'm in
Outlook and press Alt+F8, ant choose the macro it says: sub or
function not defined, and it goes to VBA. I press F5, and it works
again...
And the third thing is I do not know how to copy/move messages to a
specified personal folder so I used PickFolder method,
I copy the code for convenience:
Public Sub przenies()
Dim theItem As MailItem
Set def = Outlook.Session.PickFolder
For Each theItem In Outlook.Session.GetDefaultFolder(olFolderDeletedItems).Items
theItem.Move def
Next theItem
End Sub
Should anyone be helpful with my problem I will be grateful,
regards, toocool
I'm having three problems with a macro in Outlook.
First of all it steps out of "for each" after two steps, whereas it
should do more... (depending on the number of messages)
The second thing is it works when I run it from VBA, but when I'm in
Outlook and press Alt+F8, ant choose the macro it says: sub or
function not defined, and it goes to VBA. I press F5, and it works
again...
And the third thing is I do not know how to copy/move messages to a
specified personal folder so I used PickFolder method,
I copy the code for convenience:
Public Sub przenies()
Dim theItem As MailItem
Set def = Outlook.Session.PickFolder
For Each theItem In Outlook.Session.GetDefaultFolder(olFolderDeletedItems).Items
theItem.Move def
Next theItem
End Sub
Should anyone be helpful with my problem I will be grateful,
regards, toocool