Recover the color category in Outlook 2003+problem with GetItemFro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
2 questions
1 - How can i recover the color category wich is new in Outlook 2003 (the
property categories is for the old categories in then 2000 version)
2 - i have problem with GetItemFromID in outlook 2003. the function does'nt
return me any error if the message is deleted in outllok (it works in version
2000). How can i test this !!

Thank you for your help
 
1) What do you mean by "recover"?

2) Maybe the item is still in the Deleted Items folder?
 
Rerun Outlook or Office setup and under the custom settings for Outlook, choose to install Collaboration Data Objects.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



I already tried this but Windev accepts MAPI.Session but block immediatly
after and returns an error message with MAPI.Message MAPI.Fields and
MAPI.Field
that says
the automation object 'MAPI.Message' is not installed on your system

Anyway, the outlook object would be much easier for me !!!

Thank you very much for your answers









Sue Mosher said:
You must use CDO or Redemption, not Outlook objects, to work with the MAPI property that holds the user's color label selection. See http://www.outlookcode.com/codedetail.aspx?id=139 for sample code.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Sorry I'm french so my vocabulary isn't so good.

By recover i mean retrieve or give the property to a calendary item.

I program in Windev language. The source (simplified) is :

wm_OutLook est un objet OLE dynamique // Objet "OutLook.Application"
wm_NameSpace est un objet OLE dynamique/ Objet NameSpace, "MAPI"
wm_Folder est un objet OLE dynamique
wm_Item est un objet OLE dynamique // Objet Item
wsUtilisateur est une chaînel'utilisateur
nIDDossier est un entier
wm_OutLook=allouer un objet OLE "OutLook.Application"
wm_NameSpace=wm_OutLook>>GetNameSpace("MAPI")
wsUtilisateur=wm_NameSpace>>CurrentUser>>Name
nIDDossier=9
wnTypeItem=1
wm_Folder = wm_NameSpace>>GetDefaultFolder(nIDDossier)
wm_Item = wm_OutLook>>CreateItem(wnTypeItem)
wm_Item>>Categories = Table.Ay_desig[wi]
wm_Item>>Subject = Table.Ay_desig[wi]+" du "+DateVersChaine(w_date)
wm_Item>>Body = Table.Ax_observation[wi]
wm_Item>>Start = wr1
wm_Item>>End = wr2
wm_Item>>ReminderSet=Vrai
wm_Item>>ReminderMinutesBeforeStart = 5
wm_Item>>Save()
------------------
the property categories in
wm_Item>>Categories = Table.Ay_desig[wi]
is the category in the bottom of the window not the new categorie of outlook
2003 wich you can give a color.
I hoped microsoft created a new property like Colorcategory but i believe
they didn't.
 
The Items Command Bar COM add-in sample from http://www.microeye.com shows how to incorporate the installation of CDO into an application. Or, if you have other Office settings to deploy, you could use the Custom Maintenance Wizard from the Office Resource Kit. I always recommend that CDO be included in the basic Outlook installation, since so many applications use it.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Thank you, I will try this.

The problem is that the software I create has to be installed on many
computers (more than 200 ).
If we have to reinstall every computers, it will be an huge job.

Sue Mosher said:
Rerun Outlook or Office setup and under the custom settings for Outlook, choose to install Collaboration Data Objects.

I already tried this but Windev accepts MAPI.Session but block immediatly
after and returns an error message with MAPI.Message MAPI.Fields and
MAPI.Field
that says
the automation object 'MAPI.Message' is not installed on your system

Anyway, the outlook object would be much easier for me !!!

Thank you very much for your answers









:

You must use CDO or Redemption, not Outlook objects, to work with the MAPI property that holds the user's color label selection. See http://www.outlookcode.com/codedetail.aspx?id=139 for sample code.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Sorry I'm french so my vocabulary isn't so good.

By recover i mean retrieve or give the property to a calendary item.

I program in Windev language. The source (simplified) is :

wm_OutLook est un objet OLE dynamique // Objet "OutLook.Application"
wm_NameSpace est un objet OLE dynamique/ Objet NameSpace, "MAPI"
wm_Folder est un objet OLE dynamique
wm_Item est un objet OLE dynamique // Objet Item
wsUtilisateur est une chaînel'utilisateur
nIDDossier est un entier
wm_OutLook=allouer un objet OLE "OutLook.Application"
wm_NameSpace=wm_OutLook>>GetNameSpace("MAPI")
wsUtilisateur=wm_NameSpace>>CurrentUser>>Name
nIDDossier=9
wnTypeItem=1
wm_Folder = wm_NameSpace>>GetDefaultFolder(nIDDossier)
wm_Item = wm_OutLook>>CreateItem(wnTypeItem)
wm_Item>>Categories = Table.Ay_desig[wi]
wm_Item>>Subject = Table.Ay_desig[wi]+" du "+DateVersChaine(w_date)
wm_Item>>Body = Table.Ax_observation[wi]
wm_Item>>Start = wr1
wm_Item>>End = wr2
wm_Item>>ReminderSet=Vrai
wm_Item>>ReminderMinutesBeforeStart = 5
wm_Item>>Save()
------------------
the property categories in
wm_Item>>Categories = Table.Ay_desig[wi]
is the category in the bottom of the window not the new categorie of outlook
2003 wich you can give a color.
I hoped microsoft created a new property like Colorcategory but i believe
they didn't.
 
Please show the code you're using to instantiate a MAPI.Message object. Are you doing a Session.Logon first? That's required.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



the Collaboration Data Objects are installed so I dont know why Windev shows
me an error message !!!
I already tried this but Windev accepts MAPI.Session but block immediatly
after and returns an error message with MAPI.Message MAPI.Fields and
MAPI.Field
that says
the automation object 'MAPI.Message' is not installed on your system

Anyway, the outlook object would be much easier for me !!!

Thank you very much for your answers

:

You must use CDO or Redemption, not Outlook objects, to work with the MAPI property that holds the user's color label selection. See http://www.outlookcode.com/codedetail.aspx?id=139 for sample code.

Sorry I'm french so my vocabulary isn't so good.

By recover i mean retrieve or give the property to a calendary item.

I program in Windev language. The source (simplified) is :

wm_OutLook est un objet OLE dynamique // Objet "OutLook.Application"
wm_NameSpace est un objet OLE dynamique/ Objet NameSpace, "MAPI"
wm_Folder est un objet OLE dynamique
wm_Item est un objet OLE dynamique // Objet Item
wsUtilisateur est une chaînel'utilisateur
nIDDossier est un entier
wm_OutLook=allouer un objet OLE "OutLook.Application"
wm_NameSpace=wm_OutLook>>GetNameSpace("MAPI")
wsUtilisateur=wm_NameSpace>>CurrentUser>>Name
nIDDossier=9
wnTypeItem=1
wm_Folder = wm_NameSpace>>GetDefaultFolder(nIDDossier)
wm_Item = wm_OutLook>>CreateItem(wnTypeItem)
wm_Item>>Categories = Table.Ay_desig[wi]
wm_Item>>Subject = Table.Ay_desig[wi]+" du "+DateVersChaine(w_date)
wm_Item>>Body = Table.Ax_observation[wi]
wm_Item>>Start = wr1
wm_Item>>End = wr2
wm_Item>>ReminderSet=Vrai
wm_Item>>ReminderMinutesBeforeStart = 5
wm_Item>>Save()
------------------
the property categories in
wm_Item>>Categories = Table.Ay_desig[wi]
is the category in the bottom of the window not the new categorie of outlook
2003 wich you can give a color.
I hoped microsoft created a new property like Colorcategory but i believe
they didn't.
 
Back
Top