I am writing a program in VBA for outlook.
The program prompts the user when closing an email with an attachment and asks if they
would like to save the document. when storing the document I need to get the number of pages.

The code that I wrote is as follows:

Set AcroExchApp = CreateObject("AcroExch.App")
Set AcroExchPDDoc = CreateObject("AcroExch.PDDoc")
AcroExchPDDoc.Open strPath + aAttachments(i)
AcroExchPDDoc.GetNumPages

when the document is a pdf then it retrieves the number correctly, however when it is a tiff file
it always returns 0.
If you can get me any help with this i would greatly appreciate.
Thanks.