Need Help With Rule

  • Thread starter Montana DOJ Help Desk
  • Start date
M

Montana DOJ Help Desk

Outlook 2000

I have a job where I need to send a lot of emails with attached photographs.
As soon as I send these messages, a copy of the message ends up in my Sent
Items. If I don't clean out my Sent Items regularly, I get a message from
the administrator telling me that my Inbox has exceeded the maximum size
limit.

I need to maintain a 3 or 4 week archive of these messages, so I don't want
to simply delete them permanently, but I'd also like to automate the
management of these messages. So I created the following rule.

Apply this rule after I send the message
with Photo Request in the subject
and which has an attachment
move a copy to the Photo Request folder
and stop processing more rules

The Photo Request folder is a personal folder, so should not count against
the size of my Inbox. My goal was to have the messages automatically moved
to the Photo Request folder after I send them, so that they won't land in
the Sent Items folder. The problem is that the rule moves a COPY of the
message, and not the message itself. So the messages are still landing in
my Sent Items folder.

I was looking at ways of overcoming this problem, and I noticed that in the
"What do you want to do with the message" step of the Rules Wizard, there is
a "perform a custom action" option.. How do I define a custom action, and
is it possible to define a custom action that would move the messages from
the Sent Items folder to the Photo Request folder?

Is there any other way that I could solve this problem?

-- Tom

State of Montana
Department of Justice Help Desk

"Making the world a safer place."
 
G

Guest

We created a macro to look if the subject was "Certain Text" and if so, pop
up a dialog for user to select folder where Sent Item should be saved, rather
than normal Sent Items folder.

If subject is not = "Certain Text" then the message is just sent without
popup and item is stored in normal Sent Items folder. Code is:

Sub SendAndMove()

Dim myolApp As Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim SendingItem As Outlook.MailItem
Dim fldChoice As MAPIFolder

Set myolApp = CreateObject("Outlook.Application")
Set myNameSpace = myolApp.GetNamespace("MAPI")
Set SendingItem = Outlook.ActiveInspector.CurrentItem
If SendingItem.Subject = "Test" Then
Set fldChoice = myNameSpace.PickFolder
If fldChoice Is Nothing Then
' do nothing
Else
Set SendingItem.SaveSentMessageFolder = fldChoice
SendingItem.Send
End If
Else
SendingItem.Send
End If
End Sub
 
M

Montana DOJ Help Desk

Thanks for the reply. While I'm pretty good at Word VBA, I have no
experience with Outlook VBA, so I have two questions regarding your code:

1) I tried to modify the code so that the messages will always save to the
same public folder, but was not able to get that working. How could I make
the messages always save to a public folder named Public Folders\All Public
folders\DOJ?

2) If I have a message open, I can switch over to the VBE and step through
the code, and the message will be saved to the folder that I select.
However, if I simply open and send a message, I do not get the opportunity
to select a folder, so it would appear that the code getting run when a
message is sent. How do I get the code to run each time a message is sent?

-- Tom

State of Montana
Department of Justice Help Desk

"Making the world a safer place."
 
G

Guest

Sorry, Montana DOJ - I have been up to armpits in alligators the past week.
Both of these are do-able. I will try to respond in the next few days.
 
M

Montana DOJ Help Desk

No need to apologize. It's not a pressing issue, so I can wait.

There is one other thing that I'd like to ask, though. Somehow, while
trying to modify the code, my Sent Items folder got renamed to "Tom's
Personal Folders\Archives\Photo Requests". I've tried to write a macro to
rename it back to the proper name, but I just don't know enough about
Outlook VBA yet to pull that off. How can I get the folder renamed back to
"Sent Items"?

FYI: Just to be clear, I'm talking about the actual folder, and not the
Outlook Bar shortcut. It actually appears in the folder list with the wrong
name.

-- Tom

State of Montana
Department of Justice Help Desk

"Making the world a safer place."
 
M

Montana DOJ Help Desk

Thanks! I got the folder renamed back to "Sent Items."

-- Tom

State of Montana
Department of Justice Help Desk

"Making the world a safer place."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top