View Single Post
  #1  
Old August 15th 07, 08:12 PM posted to microsoft.public.outlook.program_vba
John Z
external usenet poster
 
Posts: 2
Default Please help on this VBA macro. Error 13, type mismatch

HI, Everyone,

I am very new to VBA. Recently I upgraded Office 2003 to Office 2007 for the
staffs in our company. But some of the macros can not work since then. A
person who helf our company long time ago prepared these vba codes. That's
purpose for this macro is to let our admin staff to create evelope and label
efficiently. In Outlook 2003, select one contact from Public folders, then
one of these macro to create a lable/evenlope automatically. It worked fine
in Outlook 2003 but always gives me this "type mismatch" error. I run the
debug. It seems it always have problem when the program reaches
Set AddressTable = currentDoc.Tables(1)
Set rgeAddress = AddressTable.Cell(1, 1).Range

After the program execute "Set AddressTable = CurrentDoc.Tables(1)", it goes
to error message. rgeAddress and AddressTable are define as in the beginning
of the sub. "Dim rgeAddress As Range" and "Dim AddressTable As Table".

Please help. Thank you very much in advance.




Ads