Showing posts with label BlackBerry. Show all posts
Showing posts with label BlackBerry. Show all posts

Tuesday, January 25, 2011

Smartphone Cases

I have to tell you, I'm a fan of SmartPhones, and the one-device-to-rule-them-all idea. That said, I don't want to take unneccessary chances with my data or device.

To that end, I do two things with each smartphone when I get it:

1) I password it

2) I buy a snapping holster from Seidio
http://www.seidioonline.com

Tuesday, August 10, 2010

Blackberry date issues

I have a problem - my BlackBerry, when I sync it, doesn't keep all day events as all day. Instead, it changes them internally to midnight-based.

This is an issue, as once the BB changes them to midnight-based, and they get synced back to Outlook/Exchange, they show up in Outlook as existing only at 12:00AM on the day of the event. Since the bulk of my calendar time isn't spent looking around the overnight hours, but instead is focused on waking hours activities, so it's rather easy to miss activities.

Armed with Outlook macros, I wanted to try and see what was going on under the covers.

I've written a form and a macro to expose all events that have an Outlook start date of midnight.

I ran into a couple of things really quick:
  • Outlook stores its dates in UTC
  • My time zone is -5
  • I have no record of what an event USED to be

Outlook storing dates
Outlook stores its dates in UTC, Universally Troublesome Conversions. Basically, it's a fancy name for not-your-local-time. Yes, I know what it is really.
That said, you're going to have to get the appointment in UTC, and convert it back to your local time zone. Or, if you're a programmer by nature, you do the math in your head, and hardcode the value in during the R&D phase. That said, instead of looking for events at midnight, I'm now looking for them at 04:00.

My time zone
My time zone is -5. I didn't know, when I began, that Outlook was storing things in UTC, so I hadn't recalled what my time zone UTC differential was.

No record
This is actually what's got me stuck. I have no way of knowing, just from programmatically reviewing an events current properties, if it should be an all day event or not. If I did, then I could write a sync program pretty easily. Since I don't, what we're talking about is writing a sync program that would run to "backup" the current Outlook calendar dates, and adjust them before or after the BlackBerry sync runs.

That seems like overkill - after, don't I already have a sync program?

Tuesday, May 25, 2010

Outlook: clear task due dates

I really like Outlooks 2007's task list features. However, I have some resistance to being told to do things "TODAY, like RIGHT NOW!!! SEE??? I put the task in RED in your task list!! Now you MUST do it!!"

Yeah, that? Not my favorite part.

So, I wrote a macro to adjust the dates in Outlook, so they don't turn red automatically.




Sub BlankDueDates()
On Error Resume Next
Dim ns As NameSpace
Dim fld As Folder
Dim task As TaskItem
Dim items As Outlook.items
Dim rest As Outlook.items
Dim filterSQL As String
Dim i As Integer
i = 0
Set ns = Application.GetNamespace("MAPI")
Set fld = ns.GetDefaultFolder(olFolderTasks)
Set items = fld.items
Set rest = items.Restrict("[Status] <> 'Completed'")
For Each task In rest
If task.DueDate <> "1/1/4501" Then
task.DueDate = "1/1/4501"
task.Save
End If
i = i + 1
Next

For Each task In rest
If task.Importance <> olImportanceNormal Then
task.Importance = olImportanceNormal
task.Save
End If
Next
MsgBox ("Done")

Set ns = Nothing
Set fld = Nothing
Set task = Nothing
Set items = Nothing
Set rest = Nothing

End Sub

Tuesday, May 18, 2010

Outlook: Cleaning up contacts

I love my BlackBerry.

I hate manually cleaning up after the fact when it snargleblatts itself inside Outlook.

Here's a quick-and-dirty macro I wrote to clean up after it snargleblatted my contact list by adding the string "(Home)" and "(Work)" to the names of some of my contacts without asking.




Sub AdjustContactName()
On Error Resume Next
Dim ns As NameSpace
Dim fld As Folder
Dim contact As ContactItem
Dim items As Outlook.items
Dim i As Integer
i = 0
Dim changeflag As Boolean
changeflag = False

Set ns = Application.GetNamespace("MAPI")
Set fld = ns.GetDefaultFolder(olFolderContacts)
Set items = fld.items
For Each contact In items
If InStr(1, contact.FullName, "(Home)") Then
contact.FullName = Replace(contact.FullName, "(Home)", "")
changeflag = True
i = i + 1
End If

If InStr(1, contact.FullName, "(Work)") Then
contact.FullName = Replace(contact.FullName, "(Work)", "")
changeflag = True
i = i + 1
End If

If InStr(1, contact.FileAs, "(Home),") Then
contact.FileAs = Replace(contact.FileAs, "(Home),", "")
changeflag = True
i = i + 1
End If

If InStr(1, contact.FileAs, "(Work),") Then
contact.FileAs = Replace(contact.FileAs, "(Work),", "")
changeflag = True
i = i + 1
End If

If changeflag Then
contact.Save
changeflag = False
End If
Next

MsgBox ("Done." + vbCrLf + "Counted: " + CStr(i))

Set ns = Nothing
Set fld = Nothing
Set contact = Nothing
Set items = Nothing

End Sub