Can't find procedure or module to run

  • Thread starter Thread starter laavista
  • Start date Start date
L

laavista

I'm using Outlook 2003. I am so frustrated and would really appreciate your
help. I have a procedure with parameters (e.g., sub NoMoreManual(myitem as
mailitem)
but I cannot figure how to run it!

I have looked in HELP and read the threads in this forum. One said that if
have parameters, it cannot be run via the RUN icon (or macros, run) and that
that you need to use run-a-script or rules wizard. I save my procedure,
then go into rules and still do not see it. I have search HELP on
run-a-script to no avail.

If I take the parameters out, then it runs, but get error messages, of course.

HELP!
 
You need to provide a procedure that tells outlook which "myitem" to run this
procedure against. Something like:

Sub RunIt()
Set thisItem = <some code to return a MailItem>
Call NoMoreManual(thisItem)
End Sub

We can't help you with the <some code> portion until you provide a more
complete picture of your scenario. In other words, what message do you want
to run the NoMoreManual() procedure against?
 
Thank you so much for responding to my question!! (I'm excited "to meet
you". I've ordered your book!)

I'm finding Outlook VBA very challenging. I've worked a lot with Access
VBA and some in Excel, but Outlook VBA is baffling.

What I'm actually trying to do (unsuccessfully I might add) is:
in a specific folder
folder contains COPIES of emails sent with attachments
go through each email and do a REPLY with different addressees
than the original email (same addressees each time, though)
and WITHOUT the attachment
then delete the email

The addressees must receive these emails without the attachments as the
attachments have limited information, but the addressees must have the
contents of the email iteself.

It sounds so easy, but ...

I was trying out different things I found in forum threads and the help
file, but immediately stumbled when I could find the procedure I just created.
 
The simplest way to process a folder other than the one you're currently
looking at is to use the Namespace.PickFolder method to display the built-in
folder picker dialog and return the folder that the user choosers. Then, you
can process each item in the folder, for example:

On Error Resume Next
Set myFolder = Application.Session.PickFolder()
If Not myFolder Is Nothing Then
For Each itm in myFolder.Items
Call NoMoreManual(itm)
Next
End If
 
Back
Top