View Single Post
  #4  
Old August 21st 06, 07:22 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Make move mean copy..

Ah, I see. Try this code, which you run after selecting the item in your
Inbox:

Sub CopyMessageAndDeleteOriginal()

Dim objOrig As Outlook.MailItem, objCopy As Outlook.MailItem
Dim objDestinationFolder As Outlook.MAPIFolder

If Application.ActiveExplorer.Selection.count = 0 Or
Application.ActiveExplorer.Selection.count 1 Then Exit Sub

'This will prompt you to choose a folder where you want to copy the
message to
Set objDestinationFolder = Application.GetNamespace("MAPI").PickFolder

If objDestinationFolder Is Nothing Then Exit Sub

Set objOrig = Application.ActiveExplorer.Selection.Item(1)
Set objCopy = objOrig.Copy
objCopy.Move objDestinationFolder
objOrig.Delete

Set objOrig = Nothing
Set objCopy = Nothing
Set objDestinationFolder = Nothing
End Sub

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Slick_lar" wrote:

Sorry if I wasn't clear. I want it out of my inbox on both the
Blackberry and on my desktop. If I move it to the PST, it stays on the
BB, Blackberry. If I copy it then delete it from my inbox so that it
goes through my exchange deleted items, the BB knows where it went and
it will remove it from my BB Inbox.

Does that help? Here is a link to a forum with someone having the same
issue I am having. I am trying to get around it with an Outlook macro
of some type.

http://blackberryforums.pinstack.com...ciliation.html

Thanks

Eric wrote:
I don't understand - why do you want to delete the message as soon as you
copy it?

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Slick_lar" wrote:

My corporation uses Blackberry devices. Moving somethign from my inbox
to a PST folder does not reconcile on teh Blackberry. The reason is
that the Blackberry server does not know where the mail went, so it
leaves it on the device inbox.

I want to take a drag and drop move to a PST and change it into:

1. Copy not move.
2. Mark as read
3. Delete through trash can
4. Permanently delete.

Any ideas or code I can start with?

Thanks




Ads