Friday, April 27, 2007

Clean the snake...

It is late; I had a very good day today; I arrived home to find the snake has soiled his cage... yuck ... once that is clean then the place has to air out ... we are sharing the Den tonight so dw and her so can have the upper room... I really hate the snake when he is an inconvenience ... the rest of the time, I could care less that he is here taking up space and energy ... I guess a lot of people on this planet probably feel the same about me too though, so I don't worry about him too much.

Saturday, April 21, 2007

Control - a discussion

This summary is not available. Please click here to view the post.

Saturday, April 14, 2007

OnA Part 1

Tomorrow, we start the first of a series of Sunday school classes to discuss the background and integrity of theological positions which are not homophobic. It is very cool to be among a group of individuals who understand that an individual may share the same faith as they do yet have a different set of beliefs and biblical interpretations due to accepting a different set of historic Christian philosophies, theologies and scholars in forming their theology.

Zoo and Arc

I just spent the day at the Zoo with my dear wife, our children and my wife’s girl friend. I believe a wonderful time was had by all and it was good to spend some time in communication with dw and dwf. My dw is as I have known since we begin to date sexually and sensually more identifiable as lesbian then anything else. We have been committed partners, friends, lovers and parents for over a decade and continue to be so, but now we are opening up to the possibility that dw may have found a partner to complete that segment of her internal puzzle for which I could never satisfy. It is for me actually a great pleasure to see my wife reposed in a sense of completeness to which her companionship has long placed me. dwf too seems quite content with dw’s partnership though admittedly somewhat overwhelmed by the dynamics involved. I grew up around individual family unites that where anything but your typical Anglo-Saxon North Eastern Male/Female monogamous nightmare and have never had much of an inclination to force or encourage anyone into what for we would be a bizarre self inflicted masochism. Of course, the arc of our intimate relationships which places dw in the middle of dwf and I is of a concern to all of us. None of us wishes to be a stumbling block to the others and neither dwf nor I wish to cause dw to feel pulled or forced in one direction. I personally hope to celebrate with dw our twenty year anniversary in another decade while dw and dwf are celebrating their first decade together. As long as we always to the absolute best we can and make amends when we fail to do so, I think we will be fine.
Back to the Zoo and our awesome children! Our boy (4 yr) and our girl (2 yr) had a wonderful action packed time! We explored ever nook and cranny of the Baltimore Zoo today and found time to experience life as a bat, turtle, chimpanzee, and warthog! Our girl was particularly fond of the bats though not at all thrilled with the cave. Our boy was completely enthralled by the Marsh exhibit and the tree slide. He found the rope bridge very uncomforting. I personally loved it because it reminded me of one I used to cross each year in Wyoming with much trepidation. What was a moderately intense event for me as a child is now something of great nostalgic value. Our boy also found himself very well suited to the farm exhibit; indeed the animals that shied away from other children came immediately to him. It is quite interesting to see how this bundle of frenetic energy can immediately silence into absolute stillness to calm, comfort and coddle another beast.

The traditional metals for a ten year anniversary tin and aluminum because they are flexible; they can bend and do not break. I love that analogy.

Thursday, April 12, 2007

Public Folder Outlook Custom Form

Client Specific names have been changed.
I had a client service call come up in which individuals in the field were not getting all the contact information from an Outlook Public Folder Contact List when they synchronized the information with their phone/PDA.
Now I haven’t had to code and/or manage Outlook for a few years and I am not one to reinvent the wheel.
First thing was to look at the information from the Outlook Public Folder Contact List and from the PDA. The Contact List was managed through a custom form “OurContactForm” which had within it a custom field for collecting direct dial numbers (DDN). This field was not downloading to the mobile devices because there was no code behind to do so and all they were getting was the default IMP.Contact.Item fields.
Just a bit further research reviled that the “OurContactForm” form was originally created by a sales person and had initially contained a myriad of custom fields which had over time been systematically replaced with default contact item fields.
Side Note:
Anyone who has worked with Sales and/or Marketing departments staff will be familiar with this type of scenario. Why is that? I have never had a department except Sales and/or Marketing who will just start using a “Jerry did this” product/process as production without talking to anyone else in the company. Even in this case a five minute conversation like “hey, I have been thinking of utilizing custom forms to help get a unified presentation of our contacts. I will build it out in my copious free time.” And a reply of, “Great, be sure to use default custom values first just as a best practice, I would be happy to review your work or provide any guidance.” would have saved this company some hundred hours in modifications (without a basic knowledge of VBScript every change to a default item field was accompanied by data entry copy/paste).

I found previous bits and pieces of code from past “programmer/developer” staff members who had started putting together code to copy the DDN custom field data to the default IMP.Contact.Item.BusinessTelephoneNumber field “Business Phone” (BTN), but for whatever reason had never finished any of the various iterations of the code successfully.
The simplest solution to this issue then appeared to be to take the following steps.
1. Build a custom form “CopyDdn2Btn” with vbscript code in the Item_Open function to copy the “DDN” field value to the “BTN” field value.
a. An amendment to this code included assigning the custom form “OurContactForm” to the item after they where modified. Otherwise each item would try to open using the “CopyDdn2Btn” form
2. Alter the existing custom form “OurContactForm” to utilize the “Business Phone” field rather then the custom “Direct Dial” field
3. Alter the Public Folder default views replacing “Direct Dial” with “Business Phone”

Of course, the first step in this little scenario is to ensure I have ownership on the public folder in questions “OurContactNumbers”. Once that is accomplished, I copy the folder to a public folder subdirectory for testing and development.
Next I create the form “CopyDdn2Btn” from the “OurContactForm” and add “Business Phone” (IMP.Contact.Item.BusinessTelephoneNumber) to it and the following code.
=============
' VBScript source code
' Open Form Copy at item level Direct Dial to Business Phone
' Modified By James Andrew Malone 4/10 & 4/11 2007 Office Outlook 2003
Sub Item_Open

Dim objFolder ' As MAPIFolder
Dim objItems ' As Items
Dim objItem ' As Object

' Change the following line to your new Message Class
NewMC = "IPM.Contact.OurContactForm"

' Set objFolder to the current folder
set objFolder = Application.ActiveExplorer.CurrentFolder

If Not objFolder Is Nothing Then
' Set objItems to the current folder items
set objItems = objFolder.Items

' Loop through all of the items in the folder
For Each objItem In objItems
' make sure you have a Contact item

If objItem.Class = 40 Then ' Class = 40 = olContact
' convert to your published custom form
objItem.MessageClass = "IPM.Contact.CopyDdn2Btn"

strDDN = cstr( objItem.UserProperties("Direct Dial") )
strFullName = cstr( objItem.FullName )
strBTN = cstr( objItem.BusinessTelephoneNumber )

if strDDN <> "" then
if strDDN <> strBTN then
' MsgBox "Before!: " & strFullName &_
' " BTN: " & strBTN &_
' " DDN: " & strDDN

objItem.BusinessTelephoneNumber = strDDN
' Save the changed item
objItem.Save

' msgbox "After: " & cstr(CurItem.FullName) &_
' " BTN: " & cstr(CurItem.BusinessTelephoneNumber) ' &_
' " DDN: " & cstr( objItem.UserProperties("Direct Dial") )

End if ' if strDDN <> strBTN
End if ' if strDDN <> ""
' Test to see if the Message Class needs to be changed
If objItem.MessageClass <> NewMC Then

' Change the Message Class
objItem.MessageClass = NewMC

' Save the changed item
objItem.Save

End If
Else
MsgBox "objItem Class = " & cstr( objItem.Class ) ' exit sub
End if ' If objItem.Class = olContact

Next ' For Each objItem In objItems
Else
MsgBox "objFolder Is Nothing!"
End if ' If Not objFolder Is Nothing
Set objItems = Nothing
Set objItem = Nothing
Set objFolder = Nothing
MsgBox "Done."
End Sub
=============

I then publish this form in my test contact folder
Next I alter the “OurContactForm” changing the “Direct Dial” text box property to “Business Phone”. I also increased the version of the form and published it to my test contact folder.
Run the code:
• Select the public folder in the navigation bar
• From the Outlook menu browse through Tools > Forms > Choose Forms
• Browse to the test folder
• Select the “CopyDdn2Btn”
• Choose Open.
The form churns through the contact items and makes the changes. When the task is complete a “Done.” message pops up. Click “OK” and close the form. If prompted to save click “No” – this is asking about saving a blank contact item which was created when this custom form was successfully opened.
The public folder already had “OurContactForm” as its default form.
• Right click the public folder in the navigation bar; select properties; “When posting to this folder use:” should be set to “OurContactForm”. This only affects new items, existing items where associated with the form in the code.
The public folder views need modified and published
• From the Outlook menu browse through View > Arrange By > Current View > Define Views
• Make the changes to each public folder specific view
o Select the view
o Click Modify
o Make changes
o Click “OK”
• publish the changes
o Select the view
o Click “Publish”

Once users reviewed the test public folder, I publish the new “OurContactForm” in the production public folder and I execute the “CopyDdn2Btn”
Then publish the view changes to the production public folder

Resources:

Tutorial: Creating and distributing custom forms with Outlook By Debra Littlejohn Shinder, MCSE, MVP.

Publish a public folder view

OL2002: How to Update Existing Items to Use a New Custom Form

DevGuru VBScript Index

Microsoft Outlook Programming By Sue Mosher

Microsoft Outlook Custom Forms

To convert imported data to custom fields