xmi
asked on
Migrating Outlook form (2003->2007) - Issue with Item_write
Hello,
A long time ago I wrote a small Outlook 2003 form. The goal of the form was quite simple: creating a custom appointment by presenting the user with two additional text fields, and, upon exiting, add the content of the fields to the subject. I am trying to use this form from within Outlok 2007 and it does not add anything to the subject.
I imported the form successfully, I can open it, I see my custom fields. I assume there is something wrong with the VB code used to modify the subject.
Any help or pointer would be appreciated.
A long time ago I wrote a small Outlook 2003 form. The goal of the form was quite simple: creating a custom appointment by presenting the user with two additional text fields, and, upon exiting, add the content of the fields to the subject. I am trying to use this form from within Outlok 2007 and it does not add anything to the subject.
I imported the form successfully, I can open it, I see my custom fields. I assume there is something wrong with the VB code used to modify the subject.
Any help or pointer would be appreciated.
Function Item_Write()
intPos = Instr(Item.Subject,"[")
if intPos > 0 Then
strTemp = Left(Item.Subject, intPos-2)
Item.Subject = strTemp & " [" & Item.UserProperties.Find("fldActe").Value & "] - " & Item.UserProperties.Find("Statut").Value
Else
Item.Subject = Item.Subject & " [" & Item.UserProperties.Find("fldActe").Value & "] - " & Item.UserProperties.Find("Statut").Value
End If
End Function
ASKER
Hi,
While I was about to test your suggestion, I realized that the code works fine when creating an appointment in the user's own calendar but not in the manager's shared calendar. This is something I did not see because the goal of the add-in is to streamline the way some appointments are taken by various people in the manager's calendar.
The manager also migrated from outlook 2003 to 2007. Should I have performed extra steps on his Outlook to make sure the addin work for all users ?
Thanks,
Xavier
While I was about to test your suggestion, I realized that the code works fine when creating an appointment in the user's own calendar but not in the manager's shared calendar. This is something I did not see because the goal of the add-in is to streamline the way some appointments are taken by various people in the manager's calendar.
The manager also migrated from outlook 2003 to 2007. Should I have performed extra steps on his Outlook to make sure the addin work for all users ?
Thanks,
Xavier
Xavier,
How is the code supposed to work with the manager's calendar? In other words, describe how the form should work on the manager's calendar.
How is the code supposed to work with the manager's calendar? In other words, describe how the form should work on the manager's calendar.
ASKER
Hi,
The goal is to create some special appointment. This special appointment is a standard appointment with some extra information added to the subject: "my appointment subject" is transformed into "my special appointment subjet [abc] - [X]" where "abc" is a number entered via a text control box and "X" is a character entered via a drop down list control box. (see images attached to this post).
The requested behavior is supposed to be the same for everyone: the manager, when a special appointment needs to be created, switch Outlook to his own calendar, goes to the Actions menu, selects "New Special Appointment", enters the usual information plus 'abc' and 'X'. Upon saving, the subject of the appointment is modified and saved to the manager calendar.
The manager has designated a few people as delegates for his calendar. These people must be able to create those special appointments into the manager calendar. So, they switch the Outlook view to the manager's calendar, go to the Actions menu, select "New Special Appointment", the usual information plus 'abc' and 'X'. Upon saving, the subject should be modified as outlined here above but nothing happens. Weird things: if a user tries to create a special appointment in his own calendard instead of the manager's calendar, the code behaves as expected.
This has been working fine for 6 years with Outlook 2003. I first thought of a code issue, but it looks more like a security or deployment issue with the "fdm" addin.
Thanks.
acte1.jpg
acte2.jpg
The goal is to create some special appointment. This special appointment is a standard appointment with some extra information added to the subject: "my appointment subject" is transformed into "my special appointment subjet [abc] - [X]" where "abc" is a number entered via a text control box and "X" is a character entered via a drop down list control box. (see images attached to this post).
The requested behavior is supposed to be the same for everyone: the manager, when a special appointment needs to be created, switch Outlook to his own calendar, goes to the Actions menu, selects "New Special Appointment", enters the usual information plus 'abc' and 'X'. Upon saving, the subject of the appointment is modified and saved to the manager calendar.
The manager has designated a few people as delegates for his calendar. These people must be able to create those special appointments into the manager calendar. So, they switch the Outlook view to the manager's calendar, go to the Actions menu, select "New Special Appointment", the usual information plus 'abc' and 'X'. Upon saving, the subject should be modified as outlined here above but nothing happens. Weird things: if a user tries to create a special appointment in his own calendard instead of the manager's calendar, the code behaves as expected.
This has been working fine for 6 years with Outlook 2003. I first thought of a code issue, but it looks more like a security or deployment issue with the "fdm" addin.
Thanks.
acte1.jpg
acte2.jpg
Apologies for taking so long to respond.
So the process works fine for the local calendar, but not for the shared calendar. Is this actually an add-in, or just a custom form?
So the process works fine for the local calendar, but not for the shared calendar. Is this actually an add-in, or just a custom form?
ASKER
It's a form (fdm file installed on each computer).
Thanks
Thanks
Have you tried using an .oft instead?
ASKER
Hi,
Sorry for the long delay. I haven't tried to use an oft. Maybe a stupid question but how can I convert the form from fdm to oft ? By editing it and saving it as an oft ?
Thanks,
Xavier
Sorry for the long delay. I haven't tried to use an oft. Maybe a stupid question but how can I convert the form from fdm to oft ? By editing it and saving it as an oft ?
Thanks,
Xavier
Yes, by editing and saving.
ASKER
I did a test and it does not seem to work. I will be onsite for a full day next week and will have some time to perform more tests. I'll post the results back.
Thanks for your help and patience.
Thanks for your help and patience.
You're welcome. No problem.
ASKER
No luck. Oft doesn't work. And what drives me crazy is that the fdm form works fine locally for each user, but when it comes to use it on the shared calendar, it doesn't...
I am convinced that the problem doesn't lie into the form, but somewhere in the security settings of the new Outlook 2007 (vs 2003) environment.
Thanks,
I am convinced that the problem doesn't lie into the form, but somewhere in the security settings of the new Outlook 2007 (vs 2003) environment.
Thanks,
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome.
ASKER
Issue solved.
I tested the code after eliminating the references to the user properties and it worked fine. I recommend adding code to help you debug the problem. For example, add something like
MsgBox "IF path"
MsgBox "Value of intPos: " & intPos
MsgBox "Value of fldActe: " & Item.UserProperties.Find("
MsgBox "Value of Statut: " & Item.UserProperties.Find("
to both the IF and ELSE sides of the condition so you can see which path it's taking and test the values of the user properties.