• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1027
  • Last Modified:

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.

 
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

Open in new window

0
xmi
Asked:
xmi
  • 8
  • 8
2 Solutions
 
David LeeCommented:
Hi, xmi.

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("fldActe").Value
    MsgBox "Value of Statut: " & Item.UserProperties.Find("Statut").Value

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.
0
 
xmiAuthor Commented:
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
0
 
David LeeCommented:
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.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
xmiAuthor Commented:
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
0
 
David LeeCommented:
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?
0
 
xmiAuthor Commented:
It's a form (fdm file installed on each computer).

Thanks
0
 
David LeeCommented:
Have you tried using an .oft instead?
0
 
xmiAuthor Commented:
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
0
 
David LeeCommented:
Yes, by editing and saving.
0
 
xmiAuthor Commented:
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.
0
 
David LeeCommented:
You're welcome.  No problem.
0
 
xmiAuthor Commented:
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,
0
 
David LeeCommented:
Is "Allow script in Public Folder" enabled in the "E-mail Security" section of the Trust Center?
0
 
xmiAuthor Commented:
Yes, but "allow scripts in shared folders" was not enabled. It did the trick !

Thanks,
0
 
David LeeCommented:
You're welcome.
0
 
xmiAuthor Commented:
Issue solved.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 8
  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now