Tuesday, July 2, 2013

VBA: Get the contents of a search folder (Outlook 2013)

There's a different way of accessing search folders with VBA versus regular mail folders in Outlook. This seems to be poorly documented online so I thought I'd help out with that.

First, you will need to determine the display name of the Outlook store which contains your search folders.
Use this code to list your stores.


Sub FindYourStore()
    Dim colStores As Outlook.Stores
    Dim oStore As Outlook.store

    On Error Resume Next
    Set colStores = Application.Session.Stores
'You may use Session.Stores as shortcut
        For Each oStore In colStores
            Debug.Print oStore.DisplayName
        Next
End Sub


With the name of the Outlook store, you plug that into the next subroutine. In my case, I was using this routine to parse emails in this folder. This routine will list the subject lines of every email in the designated search folder.


THIS CODE ONLY WORKS WITH SEARCH FOLDERS.


Sub ListSubjectLinesOfEmailsInASearchFolder()
    Dim StoreName As String
    Dim FolderName As String
    StoreName = "myemail@mycorp.com"
    FolderName = "Pending Terminations"
    Dim colStores As Outlook.Stores
    Dim oStore As Outlook.store
    Dim oSearchFolders As Outlook.Folders
    Dim oFolder As Outlook.Folder
    Dim mail As Outlook.MailItem

    On Error Resume Next
    Set oFolder = Session.Stores.Item(StoreName).GetSearchFolders(FolderName)
        For Each mail In oFolder.Items
            Debug.Print mail.Subject
        Next
End Sub

I hope that helps someone else out there.

Thursday, December 2, 2010

Did your earpiece go silent in your Droid Incredible?

About a month ago when answering a call with my Verizon HTC Droid Incredible I realized that I could not hear the person. I switched on speakerphone and was able to hear them just fine. If I switched off speakerphone, everything went silent on my end. This carried on for about a week and I got fed up with it. I did some searching on the Internet and found that there seems to be a variety of Android phone users who have had this problem sometime after their phones were updated to Android 2.2 from 2.1. I called HTC. They were useless. Of course it was a weekend and I would have to call back during normal business hours, bla, bla, bla. I popped off the battery and left it unpowered like that overnight. The next day it started working again. It's been fine for a few weeks now. I just wanted to put this out there so someone with this problem might find it and try this tip.


Friday, November 19, 2010

What would you like to see added to the 2nd-gen iPad?

These are some things that I think could be added to the next generation iPad which I think would help make it a better device.
  1. Carbon fiber housing to reduce the overall weight
  2. Physical rotation lock switch (removed in 4.2)
  3. knurled edges (or rubber hand grips)
  4. Verizon LTE and At&t HSPA+
  5. SD Card Slot
  6. 8 Megapixel Camera (rear)
  7. 2 Megapixel Camera (front)
  8. facetime
  9. Wireless mat charging capability
  10. Ability to charge on 500mA of current like most other USB devices
  11. Ability to change the built-in sounds with any sound I want
  12. Built-in mic for voice commands and voice notes
  13. Retina Display
  14. more RAM
  15. Ability to save home screen layouts to a file with import capability
  16. thermometer
  17. barometer
  18. altimeter
  19. compass
  20. GPS
  21. Gyroscope
  22. vibration
  23. multiple user-configurable physical buttons and switches
Oh yeah, and one more thing. Bring the price down by at least $100.

Tuesday, November 2, 2010

Is your thumb drive showing the wrong capacity?

I have a SanDisk Cruzer Micro 16GB thumb drive which I was messing around with and tried to make it bootable by ghosting a bootable image onto it. The image was too large so it failed but it left my drive in a state where it only had a 32 MB partition. Yikes! so I scoured the web looking for a utility which can restore the drive to it's original capacity and I found this one:


I can vouch for this tool that it does work!


Sunday, October 3, 2010

Is your device not responding to remote commands? Read this.

For the last couple of months, my DirecTV DVR (Model HR23-700) was not responding to the remote some times and other times it would respond just fine. There's a small blue indicator on the front of the DVR which flashes when it detects an infrared command from the remote. When the DVR was not responding to the remote, this light would not flash.

1. It's not the remote

I use a Logitech Harmony One remote for my entire setup and the Harmony controls all other devices just fine. Only the DVR had problems, so I know it was not the remote. Just to be sure, I tried the manufacturer's remote when the problem occurred and the problem did not go away with the use of a different remote.

2. It's not the DVR

I did some research online that suggests that that there might be infrared light coming from somewhere else in the room that is interfering with the receiver. Possbile sources of this IR light include: Daylight, CFL Bulbs, LCD TVs. Since the problem happened at night, I know it wasn't daylight. It also happened even when there were no lights turned on in the room. So I tried turning off the TV. Problem went away instantly. Wait a minute, what?

3. Something about the TV

If it is the TV, why does it not happen at all sometimes? I researched some more and found that LCD TVs can emit a lot of IR light when they are "warming up." In my case it was my backlight reaching full brightness. Most LCD TVs, except for those marketed as "LED TVs" use a compact fluorescent bulb that goes all the way around the edge of the TV as a backlight. Apparently, this backlight can take a few minutes to reach full brightness. And during this time, there is a ton of infrared light leaking out of the display. It's been referred to online as the "IR leaking" phenomenon.

4. Why now?

I couldn't imagine that the problem would just start happening all of a sudden. For almost a year I have not had a single issue with this DVR. On one online AV forum I read a suggestion to try adjusting the backlight brightness. That's when I remembered that a couple of months ago I calibrated my TV for the best picture using the Digital Video Essentials HD Basics Blu-Ray disc. As part of the calibration I had turned my backlight brightness down from 50% to about 30%. That must be what caused this problem to suddenly appear.

5. The fix

When I had just turned everything on, and the DVR was not responding due to the backlight warming up, I opened up the TV settings and adjusted the backlight brightness. I kept trying the DVR remote and it started working consistently as soon as I reached about 40% brightness. I put it back to 50% just for good measure. This fixed the problem. Now I can hit the "watch TV" activity on my Harmony remote and everything gets turned on and I can control the DVR right away without getting the interference from the TV.

6. Bottom line

I have a Vizio VO32LF which is a 32 inch Full HDTV. Apparently when the TV is properly calibrated, it leaks IR light for the first 20-30 minutes which interferes with my DirecTV DVR. I imagine that other devices might be susceptible as well but I haven't personally seen it. This problem is not unique to this TV either, as other people have reported that they have this problem with other brand / model TVs. I have read that it can even happen with plasma TVs. LED TVs seem to be immune to this problem from what I have learned.

Saturday, August 14, 2010

A solution to the fully-electric car charging problem

The problem with existing fully-electric cars is that there is no simple way to charge them and be able to take them long distances. The ideas below are my attempt to solve this problem for the future of electric vehicles.

A simple solution to the Electric car charging problem is to have removable batteries. If the batteries are removable they can be exchanged. These are some considerations in the manufacture of the batteries and their distribution.
  1. Electric cars must be made to use removable batteries.
  2. All Electric cars must use the same exact batteries so they are interchangeable.
  3. The batteries must be made with handles and must either be light enough to carry long distances or made with wheels attached which are sufficient size so they can be easily rolled long distances on pavement, gravel, or loose dirt.
  4. The batteries must be at the appropriate height in the vehicle to be inserted and removed from both the vehicle and the charging stations by a disabled person in a wheelchair.
  5. Gas stations and other stores must clearly mark on the outside of the building that they offer charged batteries for rent or for sale, and be able to exchange depleted batteries for charged ones. This is the EXACT SAME concept as propane tanks.
  6. Electric car owners may carry spare batteries in the vehicle so the batteries must be well sealed, be able to be stored at any angle for long periods of time and be protected against high temperatures and extreme cold.
  7. Electric car owners must be able to buy and charge their own batteries at home, charging them via a normal household mains socket.
  8. Vehicle manufacturers must offer an out-of-vehicle charging station to be used with the batteries, in addition to offering an in-vehicle charging solution which does not require the batteries to be removed for charging.

Thursday, July 22, 2010

Future technologies, part 1


Device resolution-independent computer operating systems

In the past, we had CRT monitors which would allow us to fill a 15 inch monitor with an image, whether that image was based on a high resolution or a low resolution. If you desired the items on the screen to appear larger, you needed only to reduce the resolution selected for the interface and they would scale to fill the entire space available. This did not result in fuzzy images, in fact it usually sharpened the images to do so. When we started using LCD displays for computers things changed. These panels have a fixed, native resolution. That means they only look sharp at that one particular resolution. If you change it to something else, you get a blurry image, and that can sometimes defeat the purpose of changing the resolution to make things bigger. Resolution independence will be a huge advantage for older people and others who have trouble seeing text at normal sizes. Rather than "dumbing-down" the resolution to make things appear bigger, the way they do today, I imagine a future where the operating system's selected resolution is always set to the native resolution of the connected display. Imagine an operating system which can scale its interface up or down in size smoothly while keeping the resolution unchanged. There may even be a slider or a virtual knob of some kind to dial in the precise factor of magnification desired. I presume that the size of text at 12 point font will be the basis of the factoring system used. We are already seeing some devices with extremely high resolutions. Apple's iPhone 4 features the retina display. It's a screen with a resolution of over 320 pixels per inch. Imagine that kind of resolution on a 22 inch widescreen monitor. That would mean a resolution of around 5480x3424 If you rendered current operating systems at that resolution on a 22 inch widescreen display, things would appear about 3.26 times smaller than they are now. Clearly, the answer for this is resolution independence. There is evidence of this already on the iPhone 4.