Delay email sending in Outlook (like gmail)

Tags

, , , , ,


Today I decided to change one annoyance about Outlook… the fact that it sends out emails immediately and there’s no way to ‘undo’.

I have tried alternatives, like ‘explicit sending’, which results in my forgetting that the email didn’t go out, or using ‘delayed sending’, which is a pain, since you need to do it every time.

Wouldn’t it be better if I could have the option to ‘undo’ sending an email, or just let it be otherwise?

So, I’ve written this quick script in VBA which does just that.  In my case, it delays the sending of the email by 5 minutes… if you don’t withdraw it within that time, it simply gets sent… you can change the value to your liking in the code.

To get this done, simply add the following code to your ‘ThisOutlookSession’ class.


Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
 Const defaultDelayInMinutes As Integer = 5

Dim timeToSend As Date
 Dim mi As Outlook.MailItem

 On Error GoTo ErrorHandler

 timeToSend = Now + TimeSerial(0, defaultDelayInMinutes, 0)

 Set mi = Item
 mi.DeferredDeliveryTime = timeToSend
Exit Sub

ErrorHandler:
 MsgBox "Application_ItemSend: " & Err.Description
End Sub

Hide your mouse cursor in Windows for ALL applications (even Visual Studio)

Tags

, , ,


Although Windows already has an option to hide the mouse cursor whilst typing, which can be found under Control Panel/Mouse, this is respected on a ‘per application’ basis.

Unfortunately, many applications, such as Visual Studio, do not respect this setting, and leave the mouse cursor visible whilst typing.

This can be quite annoying, as one tends to type exactly where one clicked, i.e., where the mouse cursor currently is, and especially in the case of developers, the IDE is particularly rich, meaning that the mouse cursor will normally also activate tooltips related to the item they are hovering over.

This is a small script I have written and compiled using AutoHotKey that hides the windows cursor when a user starts typing any alphanumeric (and certain coding-related) characters, and shows it again as soon as a mouse movement is detected.

You can either get the latest executable from here, or you can run it as an AutoHotKey script by downloading the AutoHotKey utility from here

You can find the project landing page here, and my github repository here.

Visual Studio 2012/2013 Page Inspector fails with “Object reference not set to an instance of an object”

Tags

, , , , , ,


I’ve had this problem for as long as I can recall.  My page inspector in Visual Studio 2012 never worked… which normally would have been ok, since I could always do the old-school edit+save+refresh routine… but when you know that the feature exists, it is a bugger that it doesn’t work.

I tried everything, from disabling all my extensions and add-ons, to hooking up a debugger to my devenv process… to the obvious google-and-bing-fu manic searches… but got nothing.

If you check your ActivityLog.xml, you will see that Page Inspector is blowing up with a NullReferenceException… no surprise there.

After installing VS2013 I hoped that all of this would go away, but I got the same error.

Page Inspector fails with Object reference not found

Page Inspector fails with Object reference not found

Finally, I had the great brain wave of setting Internet Explorer as my default browser and restarting Visual Studio (I’m a chrome user).

…and voilà… page inspector finally works :(

One would think that by this time, this whole thing about being wired-in to Internet Explorer was a thing of the past… clearly it is not.

I’ve filed a bug report accordingly on Microsoft Connect.

DM2S63MFEY9G

SetSite failed for package [CctSharedPackage]

Tags

, , , , , , ,


I’ve seen this exception way too many times in Visual Studio 11 and 12… turns out that it is an issue with Azure SDK 2.2 – and my google-fu skills failed to find a solution online.

Yet… if you look into your C:\Users\[username]\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml file, you’ll find errors on the lines of:

Could not load file or assembly ‘Microsoft.VisualStudio.WindowsAzure.Diagnostics, Version=2.2.0.0…

The fix turns out to be quite simple, once you see that error.  This just means that the assembly cannot be found… so hey, just add it to your GAC like so:

Add assembly to GAC

Add assembly to GAC

Voila… problems solved.

 

Show more tiles on your Windows 8 and 8.1 start screen

Tags

, , , , , , ,


Ok, so I’m slowly getting used to the Windows 8+ tiles mode for the start screen, and I’m admittedly preferring it to the old start menu, or the full blow ‘all apps’ view that’s available as of Windows 8.1.

But wouldn’t it be nice if we could make the tiles smaller?

This is actually an option, but quite a hidden option.

This is my tiles view before:

Windows tiles default view

Windows tiles default view

And here is what they look like after:

Smaller windows tiles

Smaller windows tiles

How do I do it? ..you may ask

Simple, just:

  • Open your charms (put your mouse in one of the left corners, or slide your finger from the right edge of the screen, inward).
  • Select Settings
  • Select Tiles
  • Select Show More Tiles
Show more tiles

Show more tiles

Note: This only applies if you select ‘settings’ whilst in ‘Tiles View’ (i.e. not in desktop mode)

I hope this helps someone :)

ASP.NET MVC always throws a System.Globalization.CultureNotFoundException

Tags

, , , , ,


I ran into this problem today.

Being an overly pedantic developer, I was annoyed that my ASP.NET MVC project was always silently throwing this exception on startup.  So I dug into the guts of System.Web.dll to find out ‘why’ this exception was being thrown.

It turns out that upon startup, ASP.NET tries to create the CultureInfo for the project by looking for the good old Satellite directories… so far, so good, this makes total sense.

The issue is more about HOW this is done.

The System.Web.Compilation.StandardDiskBuildResultCache class calls its internal FindSatelliteDirectories method.

This, in turn, fetches all the folders (a.k.a. Directories) that it finds in the Temporary ASP.NET files temp folder, and iterates over them to see if any of them are Satellite Directories.

There is a conditional statement to bypass this check if the folder is called ‘assembly’ or ‘hash’, yet it fails to check if the folder is called ‘UserCache’, which also definitely not a satellite folder.

Personally I think this is bad design in the first place, since:

  1. Satellite folders have a predictable naming convention
  2. Why check for what it is not rather than what it is?
  3. What happens if the developer decides to throw in another 5 folders? This would be an extra 5 exceptions being thrown… and nobody likes the computational cost of exceptions.

I really wish Microsoft would fix this… until then, we’re going to have to live with seeing a bunch of ‘System.Globalization.CultureNotFoundException’ on startup :(

Note: the System.Web.dll that I am checking is v4, and the one that comes with .NET Framework v4.5

 

Increase Virtual Machine Disk (vmdk) Performance On VMware

Tags

, , , ,


Here are some tips I found for speeding up the performance of a virtual disk, in my case I am using vmdk files on VMware Workstation

Follow the link -> http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008885

Send web page to device using Google Chrome

Tags

, ,


(Note: This post applies to Google Chrome.  Similar alternatives exist for FireFox)

I’ve often been browsing the web and came across a site that needed to be loaded on one of my devices (such as to download an app).

Copying the URL can be cumbersome, so I needed a solution for this annoying task.

Solution 1

The first solution I had come across, and have been using, is a QR Code Generator for Google Chrome… which can be found here -> http://tinyurl.com/ou7nq5d

The way this works, is that on any page you would generate a QR code for the current page, and then just use a QR Code scanner to scan the URL to your phone.

Step 1: Right-Click, and select ‘Generate QR Code’

Generate a QR Code

Generate a QR Code

Step 2: Scan the generated QR Code with your phone… and voilà :)

Scan the generated QR Code

Scan the generated QR Code

This solution is a bit cumbersome, but less cumbersome than actually copying the URL to your phone (or emailing/texting/gtalking it to your phone).

Solution 2

The second solution I found is even better!  This works similarly to the ‘other devices’ option in chrome, but with far less clicks.

Install the chrome to mobile plugin -> http://tinyurl.com/crkw3vx

Once this is done, a nice little icon will appear in your address bar.

Chrome to Mobile

Chrome to Mobile

This will show a pop-up with all your devices that are connected to your google account.

Send to device

Send to device

Once you do this, a push-notification (for iOS only, Android just goes straight to the page) is sent to your device (the device must have chrome installed)… select this, and bingo… you’re now browsing the page on your device.

iPhone Notification

iPhone Notification

iPad Notification

iPad Notification

Note: This will not work for Windows Phone (since there is no Chrome browser at the time of writing)… but the QR Code solution will work ;)

“Windows Program Compatibility mode is on. Turn it off and then try Setup again.” – How to uninstall an app if this happens.

Tags

, , ,


I tried uninstalling an application (in my case, I was uninstalling Visual Studio 2012 RC), and I kept getting this error.

Following the logs and the help file got me nowhere, and neither did searching all over the internet for instructions on how to uninstall this using a tool or the registry or whatever.

Disabling the program compatibility service also does not work.

It turns out that setup.exe was marked to run in Compatibility Mode, which is what was stopping me from uninstalling.

So my mission was now to find where the uninstall package actually is on my hard drive and to check what the compatibility settings are.

This is simple: (instructions are for uninstalling on Windows 8)

  1. Run the uninstaller until it fails
  2. Go to task manager
  3. Call up the context menu for the installer process (right-click)
  4. Select ‘open file location’
  5. This will open the package folder
  6. Call up the context menu for the uninstaller executable
  7. Select the ‘compatibility’ tab
  8. Disable all compatibility settings over here
  9. ~the end~

I hope this helps someone!

 

Follow

Get every new post delivered to your Inbox.

Join 1,389 other followers