VBA - Filter post in public folder

  • Thread starter Thread starter Lorenzo Soncini
  • Start date Start date
L

Lorenzo Soncini

Hi folks,
I have outlook XP and i need export some data from Public Folder to Word
document.
Public folder contain a form with some custom field.
Actually I use VBA for filtering the Item and work:
FOR EACH MyItem IN MyFolderItems
IF CDATE(MyItem.UserProperties("MyUserProperties").Value) = Data THEN
ExportToWord(MyItem)
END IF
NEXT

the problem: I have about 355.000 Item in a production folder. How can I
filter that like a SQL WHERE ? I have tried with
FOR EACH MyItem IN MyFolderItems.Restrict([MyUserProperties] = 'Data ')
but don't work. I get an error: "MyUserProperties not found"

Sorry for my bad english and thanks for any idea

Lorenzo S
 
You can use Restrict only if MyUserProperties has been defined at the folder
level. If it doesn't appear in the User-Defined Fields in This Folder list,
you'll need to add it.
 
How can add the field at the folder level?

Thanks
Lorenzo Soncini
Sue Mosher said:
You can use Restrict only if MyUserProperties has been defined at the folder
level. If it doesn't appear in the User-Defined Fields in This Folder list,
you'll need to add it.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Lorenzo Soncini said:
Hi folks,
I have outlook XP and i need export some data from Public Folder to Word
document.
Public folder contain a form with some custom field.
Actually I use VBA for filtering the Item and work:
FOR EACH MyItem IN MyFolderItems
IF CDATE(MyItem.UserProperties("MyUserProperties").Value) = Data THEN
ExportToWord(MyItem)
END IF
NEXT

the problem: I have about 355.000 Item in a production folder. How can I
filter that like a SQL WHERE ? I have tried with
FOR EACH MyItem IN MyFolderItems.Restrict([MyUserProperties] = 'Data ')
but don't work. I get an error: "MyUserProperties not found"

Sorry for my bad english and thanks for any idea

Lorenzo S
 
View | Current View | Customize Current View | Fields.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Lorenzo Soncini said:
How can add the field at the folder level?

Thanks
Lorenzo Soncini
Sue Mosher said:
You can use Restrict only if MyUserProperties has been defined at the folder
level. If it doesn't appear in the User-Defined Fields in This Folder list,
you'll need to add it.

Hi folks,
I have outlook XP and i need export some data from Public Folder to Word
document.
Public folder contain a form with some custom field.
Actually I use VBA for filtering the Item and work:
FOR EACH MyItem IN MyFolderItems
IF CDATE(MyItem.UserProperties("MyUserProperties").Value) = Data THEN
ExportToWord(MyItem)
END IF
NEXT

the problem: I have about 355.000 Item in a production folder. How can I
filter that like a SQL WHERE ? I have tried with
FOR EACH MyItem IN MyFolderItems.Restrict([MyUserProperties] =
'Data
')
but don't work. I get an error: "MyUserProperties not found"

Sorry for my bad english and thanks for any idea

Lorenzo S
 
Back
Top