Outlook Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Wednesday, 14 September 2011

GAC those assemblies

Posted on 07:50 by Unknown
              With a lot of emphasis on unit testing during development, developers sometimes spend time in bursts for deploying assemblies to GAC. The spent time though insignificant in bursts becomes considerable when considered cumulatively as a percentage of the total deployment time during development.
Following are a couple of ways to deploy assemblies to GAC on the fly and save that little percentage:

      (1)   Right Click and Deploy
      How cool would it be to have an option of right clicking an assembly and deploying it to GAC. Really cool hey!
To do this Open your registry and add a key “HKEY_CLASSES_ROOT\dllfile\shell\Add to GAC\command” and set its value to "D:\\Program Files (x86)\\Microsoft Visual Studio 8\\SDK\\v2.0\\Bin\\gacutil.exe" /i  "%1".
Refresh and voila you get an option on right click to add the assemblies to GAC

      (2)   Post Build Event  
      I have been a big fan of post build events and have been using it to do move files around.
One of my favourites is obviously the one that GACs the assemblies.
Include the following script in the post build event to GAC your assemblies:

echo "Installing assembly to GAC"
"$(DevEnvDir)..\..\SDK\v2.0\Bin\GacUtil.exe" /i "$(TargetPath)" /f

Enjoy!!

Read More
Posted in | No comments

Thursday, 8 September 2011

Outlook Macro: Move read messages from inbox to folders

Posted on 02:49 by Unknown

Being handed over a blackberry from my employer recently to monitor support e-mails, what I found out was that any e-mails that were picked by my rules and routed to some folders did not show up in my BB inbox. There are some settings that you can use on the handheld or the BB desktop manager to start syncing those folders as well. However since the BB was admin owned by my employer I could do neither of them.
So the plan was to disable these rules, let all mails get routed to my inbox and then have rules to route them to folders once I have read the rules or at-least it shows on BB. Unfortunately MS Outlook does not support rules which would run once you have read e-mails. They only get evaluated against mails coming from the exchange server. So I need an outlook macro script which would kick in every say 30 mins and move all messages from my inbox meeting the rules criteria to specific folders. After spending a few unsuccessful hours on the web trying to land an out-of-the box script I decided to write my own. It turned out to be easy, fun and educating. As a do-gooder I would like to share the macro script with you to save you a few hours…

Put the following script in ThisOutlookSession of your macro:

Private Sub Application_Startup()
Call Timers.ActivateTimer(30)  ‘This sets timer to 30 mins, It can be set to any value
End Sub

Private Sub Application_Quit()
If TimerID <> 0 Then Call Timers.DeactivateTimer ‘Please do not exclude this step, this will kill the timer we created
End Sub

Put the following script in the module of your macro:

Option Explicit
Declare PtrSafe Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerfunc As LongLong) As Long
Declare PtrSafe Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
Private TimerID As Long 'Timer object

Public Sub ArchiveIt()
Dim ns As Outlook.NameSpace
Set ns = Application.GetNamespace("MAPI")
'Open inbox folder
Dim folder As Outlook.folder
Set folder = ns.GetDefaultFolder(olFolderInbox)
Dim destinationFolder As Outlook.folder

'Move all mails from xyz@abc.com to Inbox/Production Support/xyz
Set destinationFolder = folder.Folders("Production Support").Folders("xyz")
MoveMailsByFilter destinationFolder, folder, "[SenderEmailAddress] = 'xyz@abc.com'"
End Sub

Private Sub MoveMailsByFilter(ByVal destinationFolderHandle As Outlook.folder, ByVal inboxFolderHandle As Outlook.folder, ByVal filterText As String)
Dim filteredList As Outlook.Items
Set filteredList = inboxFolderHandle.Items.Restrict(filterText)
For i = filteredList.Count To 1 Step -1
filteredList.Item(i).Move destinationFolderHandle
Next i
End Sub

Public Sub ActivateTimer(ByVal nMinutes As Long)
nMinutes = nMinutes * 1000 * 60 'Convert time to milliseconds.
If TimerID <> 0 Then Call DeactivateTimer 'Remove any existing timers.
TimerID = SetTimer(0, 0, nMinutes, AddressOf TriggerTimer)
If TimerID = 0 Then
MsgBox "Distributor failed. Contact administrator"
End If
End Sub

Public Sub DeactivateTimer()
Dim lSuccess As Long
lSuccess = KillTimer(0, TimerID)
End Sub

Private Sub TriggerTimer(ByVal hwnd As Long, ByVal uMsg As Long, ByVal idevent As Long, ByVal Systime As Long)
Distributor.ArchiveIt
End Sub

You can play around with the different properties exposed on filteredList.Item like filteredList.Item(i).Unread = false (to pick only read messages) to fine tune your archiving criteria. Enjoy!

Read More
Posted in | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Enable ActiveX Control in Outlook
    Occasionally when using Microsoft Outlook, you may receive an error message telling you that your security settings do not allow ActiveX con...
  • Outlook requires Outlook Express 4.01
    Cannot start Microsoft Outlook. Outlook requires Microsoft Outlook Express 4.01 or greater. You can install Outlook Express by running Add/R...
  • Some incomplete thoughts...
    There are a series of related ideas that I want to discuss, but I don't think I'll have the time to properly describe them here. I...
  • Microsoft Outlook Duplicate Email Fix
    When using Microsoft Outlook, you may encounter an error in which all of your emails are downloaded twice. Depending on the size of your inb...
  • The Human Side of Living
    As I go through life I keep noticing stories, ideas and insights into humanity and I sometimes wonder if we are meant to discover these less...
  • Troubleshoot Outlook Express Error 0X800ccc90
    If you're an Outlook Express user trying to log on and you get an Error 0X800ccc90, which stops your password from being authenticated, ...
  • Happy Limerick Day! (May 12th)
    The CEO where I currently work sent around the following note by email at the start of today: Today is Limerick day. A limerick is a five-li...
  • Distorted Sound
    Another problem with MSN/Windows Live Messenger is the sound cuts out. This is a known problem with versions 7, 8.0, 8.1 Beta and 8.1. Usua...
  • Now with minty-fresh visitor counter
    Someone suggested to me this past weekend that I add a visitor counter to this blog. It's one of the most common suggestions made to me...
  • Windows live mail error Ox800CCCD2
    This error generally comes up when your firewall block any port. Reconfigure your account to Live Mail and also make sure that your firewal...

Categories

  • agile
  • agile testing
  • AYE
  • bad training
  • bugs
  • building software
  • certification
  • communication
  • conference
  • configure outlook express
  • configure windows live hotmail account in windows live mail
  • configure windows live mail
  • context-driven
  • development
  • engineering
  • error message
  • ET
  • exploratory testing
  • future
  • hiring
  • hobbies
  • hotmail account validation process
  • How to Enable ActiveX Control in Outlook
  • how to fix duplicate email
  • how to solve error 4.01 or greater
  • incoming mail sync to outlook
  • information radiator
  • instruction for pst file
  • interests
  • lean
  • lean software development
  • learning
  • low tech testing dashboard
  • management
  • mastery
  • measuring progress
  • metrics
  • Microsoft Outlook Duplicate Email Fix
  • Microsoft Technical Support
  • Microsoft Windows Mail
  • ms outlook duplicate email
  • msn account reset
  • msn account validation process
  • msn error code 0x80004005
  • msn error code 0x80004005 in apple mac
  • msn error code 0x80004005 windows 8
  • MSN Error Support Msn Help and Support
  • MSN Password Recovery
  • msn password reset
  • MSN Technical Support
  • outgoing mail not sent from outlook express
  • outlook not authenticate password
  • passion
  • people
  • pop3 email server
  • programming
  • quality
  • Quality Center
  • questions
  • regression testing
  • remove error 0X800ccc90
  • remove Error 0X800ccc90/Error 0x800ccc18
  • remove error 421
  • remove error ox800ccc90
  • remove msn error code 0x80004005 in windows 7
  • remove windows live mail
  • repair microsoft outlook pst file
  • repair PST file
  • resolve sound distortion problem with your live messenger
  • reviewing resumes
  • Satir
  • SBTM
  • science
  • skills
  • software
  • software testers
  • Software testing
  • sound distortion msn
  • sound distortion with livemail
  • support for microsoft outlook
  • support for outlook
  • TDD
  • technical support for microsoft outlook
  • testing
  • testing dashboard
  • time
  • Unable To Login in Windows Mail
  • unable to loging in waindows mail
  • value
  • Waterfall
  • windows live mail error Ox800CCCD2
  • windows live mail support
  • writing

Blog Archive

  • ►  2013 (16)
    • ►  September (10)
    • ►  August (1)
    • ►  April (1)
    • ►  February (2)
    • ►  January (2)
  • ►  2012 (3)
    • ►  May (1)
    • ►  February (1)
    • ►  January (1)
  • ▼  2011 (25)
    • ►  December (1)
    • ►  October (1)
    • ▼  September (2)
      • GAC those assemblies
      • Outlook Macro: Move read messages from inbox to fo...
    • ►  August (3)
    • ►  July (2)
    • ►  May (1)
    • ►  April (2)
    • ►  March (9)
    • ►  February (2)
    • ►  January (2)
  • ►  2010 (13)
    • ►  November (1)
    • ►  September (3)
    • ►  July (1)
    • ►  May (1)
    • ►  April (1)
    • ►  February (4)
    • ►  January (2)
  • ►  2009 (10)
    • ►  December (1)
    • ►  November (2)
    • ►  October (2)
    • ►  July (3)
    • ►  May (1)
    • ►  February (1)
  • ►  2008 (4)
    • ►  October (1)
    • ►  April (1)
    • ►  March (2)
  • ►  2007 (12)
    • ►  November (1)
    • ►  August (2)
    • ►  July (1)
    • ►  May (3)
    • ►  February (2)
    • ►  January (3)
  • ►  2006 (1)
    • ►  August (1)
  • ►  2005 (16)
    • ►  November (2)
    • ►  October (1)
    • ►  September (2)
    • ►  August (1)
    • ►  May (4)
    • ►  April (4)
    • ►  February (1)
    • ►  January (1)
  • ►  2004 (2)
    • ►  December (2)
Powered by Blogger.

About Me

Unknown
View my complete profile