Discussion:
Custom File As
(too old to reply)
OutdoorRuss
2010-02-05 01:34:17 UTC
Permalink
Since I cannot add "File As" options, I would like to find a way to
set the File As field to (Company) First Name Last Name or First Name
Last Name (Company)

Is there a way/code to change the File As field to one of the above
through code after someone enters the name or company name?
Ken Slovak - [MVP - Outlook]
2010-02-05 14:14:53 UTC
Permalink
Your options are limited to the various properties available in the object
model. For Company followed by name the closest available option would be
CompanyAndFullName, depending on how FullName is set up.

Use Alt+F11 to open the Outlook VBA project, and then use F2 to open the
Object Browser. In the libraries drop-down select Outlook and in the Classes
scroll area select ContactItem to see the various properties that are
available.

You can use a loop then to iterate the contacts collection and set the
FileAs property to whatever contact property you want.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
Post by OutdoorRuss
Since I cannot add "File As" options, I would like to find a way to
set the File As field to (Company) First Name Last Name or First Name
Last Name (Company)
Is there a way/code to change the File As field to one of the above
through code after someone enters the name or company name?
OutdoorRuss
2010-02-08 21:03:54 UTC
Permalink
Ken,

Thanks for taking the time to respond! I'm an amateur at VBA though
I've had a decent amount of exposure. I'm still learning the "loop"
setup so if you are able, could you provide an example code if
possible?

Thank you!

Russ
Post by Ken Slovak - [MVP - Outlook]
Your options are limited to the various properties available in the object
model. For Company followed by name the closest available option would be
CompanyAndFullName, depending on how FullName is set up.
Use Alt+F11 to open the Outlook VBA project, and then use F2 to open the
Object Browser. In the libraries drop-down select Outlook and in the Classes
scroll area select ContactItem to see the various properties that are
available.
You can use a loop then to iterate the contacts collection and set the
FileAs property to whatever contact property you want.
--
Ken Slovak
[MVP - Outlook]http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.http://www.slovaktech.com/products.htm
Post by OutdoorRuss
Since I cannot add "File As" options, I would like to find a way to
set the File As field to (Company) First Name Last Name  or First Name
Last Name (Company)
Is there a way/code to change the File As field to one of the above
through code after someone enters the name or company name?
JP
2010-02-08 21:08:19 UTC
Permalink
There's a sample on Ken's site:

http://www.slovaktech.com/code_samples.htm#FileAs

--JP
Ken,
Thanks for taking the time to respond!  I'm an amateur at VBA though
I've had a decent amount of exposure.  I'm still learning the "loop"
setup so if you are able, could you provide an example code if
possible?
Thank you!
Russ
Loading...