WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Rules as VBA

 
   Home -> Office -> Programming VBA RSS
Next:  Compiler warning CS0467 for Inspector.Close  
Author Message
Svilen

External


Since: Sep 01, 2008
Posts: 3



(Msg. 1) Posted: Mon Sep 01, 2008 1:51 am
Post subject: Rules as VBA
Archived from groups: microsoft>public>outlook>program_vba (more info?)

Recently I moved to MS Exchange Server account on my Outlook 2003 and
I was surprised that there is a limit for the rules that I could have
active. I used to have more than 60 rules and now I have right to run
only 25....
As I understand that the limitation is on the server side so there is
nothing I could do on my local Outlook rules wizard.
I'm searching for workaround and I think that I could do it by VBA.
I would ask for a help with some guidelines how to write my rules as
VBA code.
Thanks!
Back to top
Login to vote
Sue Mosher [MVP-Outlook]

External


Since: Jun 18, 2004
Posts: 613



(Msg. 2) Posted: Mon Sep 01, 2008 7:55 am
Post subject: RE: Rules as VBA [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

See http://www.outlookcode.com/article.aspx?id=62 for other VBA approaches
for processing incoming messages.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



"Svilen" wrote:

> Recently I moved to MS Exchange Server account on my Outlook 2003 and
> I was surprised that there is a limit for the rules that I could have
> active. I used to have more than 60 rules and now I have right to run
> only 25....
> As I understand that the limitation is on the server side so there is
> nothing I could do on my local Outlook rules wizard.
> I'm searching for workaround and I think that I could do it by VBA.
> I would ask for a help with some guidelines how to write my rules as
> VBA code.
> Thanks!
>
Back to top
Login to vote
dch3

External


Since: Jul 28, 2006
Posts: 92



(Msg. 3) Posted: Mon Sep 01, 2008 8:53 am
Post subject: RE: Rules as VBA [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

(Have to ask...)

Why do you need 60 rules? Are there some that are merely nice to haves -
such as automatically filing return receipts in a specific folder? Keep in
mind that if you go with VBA, they'll only run on your specific PC. If the
harddrive crashes or anything happens to the machine, they'll all be lost.
Not to mention that they'll only run when the machine's turned on and Outlook
is open.

"Svilen" wrote:

> Recently I moved to MS Exchange Server account on my Outlook 2003 and
> I was surprised that there is a limit for the rules that I could have
> active. I used to have more than 60 rules and now I have right to run
> only 25....
> As I understand that the limitation is on the server side so there is
> nothing I could do on my local Outlook rules wizard.
> I'm searching for workaround and I think that I could do it by VBA.
> I would ask for a help with some guidelines how to write my rules as
> VBA code.
> Thanks!
>
Back to top
Login to vote
Svilen

External


Since: Sep 01, 2008
Posts: 3



(Msg. 4) Posted: Tue Sep 02, 2008 1:32 am
Post subject: Re: Rules as VBA [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks Sue,
Most of my rules are just as dch3 writes "automatically filing return
receipts in a specific folder". I need them because I receive a lot of
emails from different senders and it is very helpful for me to filter
them to specific folder.
Could you please help me to transform this code (it is on the page
that you refer to) to move the messages to some folder and not to make
them as plain text? And one more question, is it possible to run this
script apart from rules (to put it on a toolbar like a button, or run
it automatically)?

Sub ConvertToPlain(MyMail As MailItem)
Dim strID As String
Dim objNS As Outlook.NameSpace
Dim objMail As Outlook.MailItem

strID = MyMail.EntryID
Set objNS = Application.GetNamespace("MAPI")
Set objMail = olNS.GetItemFromID(strID)
objMail.BodyFormat = olFormatPlain
objMail.Save

Set objMail = Nothing
Set objNS = Nothing
End Sub



On Sep 1, 5:55 pm, Sue Mosher [MVP-Outlook] <sue....RemoveThis@outlookcode.com>
wrote:
> Seehttp://www.outlookcode.com/article.aspx?id=62for other VBA approaches
> for processing incoming messages.
> --
> Sue Mosher, Outlook MVP
>    Author of Microsoft Outlook Programming: Jumpstart
>       for Administrators, Power Users, and Developers
>      http://www.outlookcode.com/jumpstart.aspx
>
> "Svilen" wrote:
> > Recently I moved to MS Exchange Server account on my Outlook 2003 and
> > I was surprised that there is a limit for the rules that I could have
> > active. I used to have more than 60 rules and now I have right to run
> > only 25....
> > As I understand that the limitation is on the server side so there is
> > nothing I could do on my local Outlook rules wizard.
> > I'm searching for workaround and I think that I could do it by VBA.
> > I would ask for a help with some guidelines how to write my rules as
> > VBA code.
> > Thanks!
Back to top
Login to vote
Svilen

External


Since: Sep 01, 2008
Posts: 3



(Msg. 5) Posted: Tue Sep 02, 2008 1:42 am
Post subject: Re: Rules as VBA [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Yes you are right but still I need some way to filter my emails
because it is easier to manage it. I don't need the rules on another
machine because the emails are saved locally on my machine. And if
anything happens with it the rules will be the last thing that I will
regret for Smile
But please, let me know if you know a convenient way to manage
everyday mail on MS Outlook from more then 60 senders.

Thanks!

On Sep 1, 6:53 pm, dch3 <d....TakeThisOut@discussions.microsoft.com> wrote:
> (Have to ask...)
>
> Why do you need 60 rules? Are there some that are merely nice to haves -
> such as automatically filing return receipts in a specific folder? Keep in
> mind that if you go with VBA, they'll only run on your specific PC. If the
> harddrive crashes or anything happens to the machine, they'll all be lost..
> Not to mention that they'll only run when the machine's turned on and Outlook
> is open.
>
> "Svilen" wrote:
> > Recently I moved to MS Exchange Server account on my Outlook 2003 and
> > I was surprised that there is a limit for the rules that I could have
> > active. I used to have more than 60 rules and now I have right to run
> > only 25....
> > As I understand that the limitation is on the server side so there is
> > nothing I could do on my local Outlook rules wizard.
> > I'm searching for workaround and I think that I could do it by VBA.
> > I would ask for a help with some guidelines how to write my rules as
> > VBA code.
> > Thanks!
Back to top
Login to vote
dch3

External


Since: Jul 28, 2006
Posts: 92



(Msg. 6) Posted: Tue Sep 02, 2008 8:10 am
Post subject: Re: Rules as VBA [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

For starters, you can programically set the folder to which a copy of the
Sent Item is saved to (as opposed to the Sent Folder).

Information on the MailItem object and the property whose name I can never
remember
http://msdn.microsoft.com/en-us/library/aa210946(office.11).aspx
http://msdn.microsoft.com/en-us/library/aa171932(office.11).aspx

http://www.outlookcode.com/codedetail.aspx?id=456

I've worked with the property whose name I can't remember from within
Access. My guess is that you'd need script behind a custom IPM.Message form
to programmically set the folder and/or provide the folder selection dialog
to select the folder.

I'd also look at a simple Access database for use in looking up to which
folder a particular message to a person should be sent. You could either
place each person's name in the table with corresponding folder as in

txtEmail txtDestinationFolder

dch3 DeleteThis @wms.com Sent Message - Willard Madison, Inc

Or do something where its by domain name as in ...
txtDomain txtDestinationFolder
wms.com Sent Message - Willard Madison, Inc

Once you've got the lookup working for the outbound mail, it shouldn't be
too difficult to do the same for incoming messages.

I'd have three fields in the Access table - one for the email or domain, one
for the destination folder and one for the folder should be used for INBOUND
or OUTBOUND mail. That way you can save sent messages/outbound replies in one
folder and receipts/inbound replies in another.

"Svilen" wrote:

> Yes you are right but still I need some way to filter my emails
> because it is easier to manage it. I don't need the rules on another
> machine because the emails are saved locally on my machine. And if
> anything happens with it the rules will be the last thing that I will
> regret for Smile
> But please, let me know if you know a convenient way to manage
> everyday mail on MS Outlook from more then 60 senders.
>
> Thanks!
>
> On Sep 1, 6:53 pm, dch3 <d... DeleteThis @discussions.microsoft.com> wrote:
> > (Have to ask...)
> >
> > Why do you need 60 rules? Are there some that are merely nice to haves -
> > such as automatically filing return receipts in a specific folder? Keep in
> > mind that if you go with VBA, they'll only run on your specific PC. If the
> > harddrive crashes or anything happens to the machine, they'll all be lost..
> > Not to mention that they'll only run when the machine's turned on and Outlook
> > is open.
> >
> > "Svilen" wrote:
> > > Recently I moved to MS Exchange Server account on my Outlook 2003 and
> > > I was surprised that there is a limit for the rules that I could have
> > > active. I used to have more than 60 rules and now I have right to run
> > > only 25....
> > > As I understand that the limitation is on the server side so there is
> > > nothing I could do on my local Outlook rules wizard.
> > > I'm searching for workaround and I think that I could do it by VBA.
> > > I would ask for a help with some guidelines how to write my rules as
> > > VBA code.
> > > Thanks!
>
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Programming VBA All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET