Downloading Outlook contact photos / profile pictures

Sample Outlook Profile imageI wanted to grab the photos (“ContactPicture”) that people put in their Outlook Contact Details.

Not sure if I grabbed this code from somewhere, or wrote it myself.  Just leaving it here for the next time I need it.

Note to self:
* you need a local copy of the address book to run this code against.

Sub SaveContactPhoto()
Dim itemContact As ContactItem
Dim fdrContacts As MAPIFolder
Dim colAttachments As Outlook.Items
Dim colItems As Outlook.Items
Dim fname As String
'Default Contacts folder
'Set fdrContacts = Session.GetDefaultFolder(olFolderContacts)
' Selected folder
' Ensure you select the GAL folder ....
Set fdrContacts = Application.ActiveExplorer.CurrentFolder
On Error Resume Next
For itemCounter = 1 To fdrContacts.Items.Count
    Set itemContact = fdrContacts.Items(itemCounter)
    Set collAttachments = itemContact.Attachments
    For Each attach In collAttachments
      If attach.FileName = "ContactPicture.jpg" Then
         fname = (itemContact.FirstName & " " & itemContact.LastName & ".jpg")
        If fname <> "" Then
            attach.SaveAsFile ("C:\data\Contact Photos\" & fname)
        End If
      End If
End Sub

Bonus fact: Microsoft call the Outlook Contact Details “Profile Cards”

Windows 10 and Office 365 update lists

The following are sites are where Microsoft list changes to Windows 10 & Office 365

Office 365

Windows 10

Office 2010 SP2 install issues.

I’m getting ready to deploy Office 2010 Service Pack 2 out to my customers desktop fleet.  I’m going to journal the list of problems I find along the way.

Issue 1- Open File – Security Warning

Open File - Security Warning

I’m surprised that I’ve not stumbled across this issue before.  It’s caused by the “Zone Identifer” feature.  In short, if you download a file from the internet, you’ll probably see this warning.  I’m running the SP2 install from a VBscript file, which is why I’m seeing it.

There are a couple of ways around this:

  1. Copy the file to a FAT formatted drive.
    This causes the Zone Identifier flag to be stripped off.
  2. Change the SEE_MASK_NOZONECHECKS environment variable
    As documented in Microsoft KB889815
    It works.
  3. Don’t use VBscript “Use a command script”
    Also from KB889815.  Not an option for me unfortunately
  4. Use the Microsoft Sysinternals Streams utility to remove the Zone Identifier flag.
    Bit of a brutal approach, particularly if you have other information stored in the alternative data streams.
  5. Use the ZoneStripper utility.

Next (potential) issue: "Error 1718. File was rejected by digital signature policy"

Semi-regular web-link clearance – May 2010 (2)

Make Outlook assign you random To-Do items

Sometimes, you have time to check something off your to-do list, but no one task is particularly pressing. Lifehacker Reader Ricardo shows us how to make Outlook pick a random one for you, so you can skip the decision-making and get to work.

Performance Analysis of Logs (PAL) Tool

Ever have a performance problem, but don’t know what performance counters to collect or how to analyze them? The PAL (Performance Analysis of Logs) tool is a new and powerful tool that reads in a performance monitor counter log (any known format) and analyzes it using complex, but known thresholds (provided). The tool generates an HTML based report which graphically charts important performance counters and throws alerts when thresholds are exceeded. The thresholds are originally based on thresholds defined by the Microsoft product teams and members of Microsoft support, but continue to be expanded by this ongoing project. This tool is not a replacement of traditional performance analysis, but it automates the analysis of performance counter logs enough to save you time. This is a VBScript and requires Microsoft LogParser (free download).

Save Significant Disk Space by Setting MaxPatchCacheSize to 0

A little over two years ago, I wrote a post about installing Visual Studio 2005 Service Pack 1, in which I mentioned setting the MaxPatchCacheSize registry setting to 0 (in order to save some significant disk space while installing the service pack). [Note that the credit for this trick really goes to Heath Stewart — as I mentioned in my original post.]

I’ve also mentioned in various posts that I make heavy use of virtualization in the "Jameson Datacenter" (a.k.a. my home lab) and that I prefer to keep my VHDs reasonably small. This is especially valuable when, for example, I need to copy a VM from one of my home servers and take it "on the road" with me to a customer site.

System Center Configuration Manager and Duplicate GUID’s

One of the most common (and painful) issues in SMS/SCCM is the presence of duplicate guids. Each and every SMS/SCCM client generates a unique identifier upon installation known as a GUID or Globally Unique Identifier. This is completely different than the SID of the machine in Active Directory and is used only by SMS/SCCM for managing clients. If two machines are reporting into the server with the same GUID, the server is no longer able to accurately target or report on these machines. As such, getting this issue resolved is critical to the successful operation of your environment.

Bookmark and Share

An easy way to do a PDF to Word conversion

logo_pdftoword Don’t you just hate it when, after you’ve spent quite a few hours on doing something, some smarty pipes up a suggestion which meant you’ve just lost those hours.

So it was with a 150+ page PDF to Microsoft Word conversion.  Finished it, and to be honest, it was fairly crappy as the Word document has complex tables like this:
Child protection career structure, yes I get to work on some amazing documents.

which is hard to capture when you go from PDF –> Word.  And after 80 pages, my care factor was starting to get low.

The smarty suggested PDF to Word.  PDF to Word is a website where you upload your PDF, and your converted Word document is mailed back to you.  My 156 page document was converted in minutes.


Ok, the downsides, or faults if you like, in the converted document?

  • the header and footers were not converted.
  • heading styles were not created.

But for FREE, it is a great utility.

If it’s free, how do they make money?  They sell PDF software, such as Nitro PDF Professional, which is about a 1/5 the price of Adobe Acrobat Professional.

Bookmark and Share

Remove hidden data from Microsoft Office documents.

I was sent a word document with "hidden data" in it.

"Hidden data" in Microsoft Word documents can be one of several bits of information, such as hidden data, change tracking, or even comments on the document.


Such as this example:
Microsoft Word document with hidden data displayed.

This problem isn’t just limited to Microsoft Word, oh no.  It shows up in Microsoft Excel and PowerPoint too.

The solution for:
Microsoft Office XP/2003?  Download the Microsoft Remove Hidden Data add-in, and use it.
Microsoft Office 2007?  You already have it.  The option can be found under the Office Pearl –> Prepare –> Inspect Document menu item.
Office 2007 Inspect Document Option

This post brought to you by the outside company who shared a comment-enabled document with me.

Bookmark and Share

The case of the broken Microsoft Word VBA application

It was a Microsoft Word (VBA) application written back in 2001.

Essentially what it does is:

  1. user selects a letter type.
  2. the user then enters some customer reference numbers.
  3. the VBA application does an Oracle database lookup to convert those customer reference numbers into names and postal addresses.
  4. which the VBA then uses to “mail merge” into whatever number of letters need to be sent out.

And it was broken.

I had a feeling that writing about patch management policy would come back to bite me (and it did).

Continue reading

“Developing For Office – Options and Trade-Offs”

microsoft-office-logo According to Bruno Terkaly, you have three main choices:

  1. Traditional Visual Basic for Applications (VBA)
    Dates back to all the way to the early nineties.
  2. Visual Studio Tools for Office.
    Really hit its stride and office 2007. It probably represents the best option moving forward today. It tries to be all things to all people.
  3. The COM Add-In is probably the most powerful, yet the most difficult option of the three.

I’ve borrowed the above words from Bruno.  You can read all about those options in his blog post.

Bookmark and Share