|
-
Oct 23rd, 2005, 02:03 PM
#1
Thread Starter
New Member
Outlook VB Script
Hello all,
Upfront, I know nothing about VB at all...except that it stands for Visual Basic. I searched the forums in hopes that maybe my particular question had miracuously answered several times over and I could cut and paste the script right in and take up very little of your time.....no such luck.
Anyway...the deal is the company I work for uses MS Outlook 2003, and in my dept. we monitor (monitor as is a person watches it) an account we have set up, which receives emails from our customers in the field. Occasionally, something occurs that stops us from being able to receive these emails, and when that happens...its bad juju. Basically, and to use terms I hope you understand, we want a 'bot' to watch the inbox (or whatever folder) to keep a timer on when the last time we receieved an email containing a particular text. (There would actually be 2 of these timers running, as there are two different types of email that would come in, but if I can make one...I should be able to make another...I hope...)
Anyway, I guess my main question here is, can anyone point me somewhere that I can find some quick and dirty info on writing an Outlook Macro / VB Script that can handle this?? I have searched the web and to say that its convoluted is an understatement.
Thank you for your time and any help is appreciated!! 
-Koil
-
Oct 23rd, 2005, 02:28 PM
#2
Re: Outlook VB Script
Welcome to the Forums.
Since you want to keep track of emails coming into a users inbox you would not want to write any client side script as the user could disable it with the disabling of Macros.
Your solution will be to write a serverside script on your Exchange server (if your running Outlook in an Exchange environment).
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 23rd, 2005, 02:36 PM
#3
Thread Starter
New Member
Re: Outlook VB Script
Thanks for the reply!!
Its actually a 'generic' email inbox that anyone who is supposed to be monitoring it that day logs into, so there wouldn't be any need to worry about client side security or anything.
It really doesn't have to be anything to high-tech. Maybe if i give a better example:
Into this generic email box, every hour, customers systems will send us one of two messages, from one of 2 systems, with the following in the subject:
"APPLICATION A: INCIDENT CREATE: Everything okay"
"APPLICATION A: INCIDENT CREATE: INCIDENT CREATED BLAH BLAH BLAH"
"APPLICATION B: INCIDENT CREATE: Everything okay"
"APPLICATION B: INCIDENT CREATE: INCIDENT CREATED BLAH BLAH BLAH"
So, basically I want to monitor that every hour at least, in this particular inbox, I receive one of the emails above, from both system types, and if this DOESN'T happen, an email gets sent to an address of my choice letting the people in my dept. know that the emails that we're supposed to be receiving, aren't coming in.
Does this make more sense?
-
Oct 23rd, 2005, 02:40 PM
#4
Re: Outlook VB Script
Yes, but if we do it with client side Rules or VBA script Outlook will be required to be open and running all the time on some system.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 23rd, 2005, 02:52 PM
#5
Thread Starter
New Member
Re: Outlook VB Script
Yes, that is correct...this inbox is monitored 24/7/365 and someone is always logged into this email account.
So that wouldn't be a problem, or are you saying that those macros/scripts would only exist on the client PC??
If thats what you're saying, then that makes sense, I think....though the rules that we have setup for the account follow it, regardless of what workstation is actually logging into the account...maybe thats something we did on our end, though.
-
Oct 23rd, 2005, 02:53 PM
#6
Thread Starter
New Member
Re: Outlook VB Script
Actually, my dept. also only consists of approx. 30 people, so it wouldn't be inconceivable that I could just distribute this 'script/macro' to everyone and have them enable it....but I feel I may be putting the cart before the horse here.
Thanks again for your replies...I am finally getting somewhere with this!
-
Oct 23rd, 2005, 03:03 PM
#7
Re: Outlook VB Script
Yes, if we write a Rule and designate its to be stored on the Server then it will follow the user. Using the Rules Wizard to do this is the easiest way since its not too involved of an action that you want.
The only problem I see is determining if the email was not recieved. Most rules are centered around receiving emails. Hmm, may have to do a VBA script and if so then it has to be on every system where you want to monitor this from.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 23rd, 2005, 03:29 PM
#8
Thread Starter
New Member
Re: Outlook VB Script
Yeah, that does seem to be what has to happen....I've run through all of the rules options, and even trying to be creative, couldn't come up with a way for a rule to work on a non-event....
Well, I am still looking to see if I can find a resource that provides some info (granted for free, as I am doing this more as a favor than anything) on how to get started with all of this, though I am feeling that this might not be so quick as I once thought.
-
Oct 23rd, 2005, 03:42 PM
#9
Re: Outlook VB Script
You could also make this an Outlook add-in but then distribution to all 30 users is still a requirement. Either as VBA code or Add-In you need to distribute it. he only other way is if you were running Exchnage server as your mail server and then you could write server side scripting at the source.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 23rd, 2005, 04:08 PM
#10
Thread Starter
New Member
Re: Outlook VB Script
Well, we are using Exchange Servers, but I am not sure if they (meaning email admin folk) would be okay with me (a literal noob) writing scripts that would run on their servers. My depts only 30 people, but those servers service 50,000+ ppl...
Kinda scary..lol
-
Oct 23rd, 2005, 04:12 PM
#11
Re: Outlook VB Script
Ok then I see what you mean but if your boss or whoever requested this needs to realize that it would be easier and better to do it on the server. So I guess we can start on this with VBA code then?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 23rd, 2005, 04:24 PM
#12
Thread Starter
New Member
Re: Outlook VB Script
I guess the defining thing here would be how much easier is easy?? If its something that wouldn't be too hard for them to implement, then maybe that is the way to go...but (and you have to excuse my ignorance here) if its something that they will have to roll out to every exchange server we have, and create a big tadoo over, they won't go for it...so then I guess the VBA script is the way to go, but if it can be simply done with out too much hassle.....ultimately, I would say that you probably know more than I do in this and could assess the business impact of implementing something like this...(wow..that sounded good and official, didn't it?? )
-
Oct 23rd, 2005, 04:39 PM
#13
Re: Outlook VB Script
Its not hard to deploy the VBA code. Just a file copy of 1 file. You could probably do it remotely if they have their Outlook closed. Yes, it may be difficult to deploy an Exchange script to multiple servers vs. the filecopy to just 30 systems.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 23rd, 2005, 04:43 PM
#14
Thread Starter
New Member
Re: Outlook VB Script
Then I would definitely say that the VBA code is the way to go....
-
Oct 24th, 2005, 12:04 AM
#15
Re: Outlook VB Script
Ok, I am assuming that if one of the four types of emails are received then you want that email forwarded or do you want a special message emailed?
The dration for non-receipt of an email is to be ine calendar day? What about weekends? Should this be managed from a UserForm?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|