Solved

Migrating Outlook form (2003->2007) - Issue with Item_write

Posted on 2010-09-09
16
1,002 Views
Last Modified: 2012-05-10
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
Comment
Question by:xmi
  • 8
  • 8
16 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 33680480
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
 

Author Comment

by:xmi
ID: 33716993
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
 
LVL 76

Expert Comment

by:David Lee
ID: 33730101
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
 

Author Comment

by:xmi
ID: 33732254
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
 
LVL 76

Expert Comment

by:David Lee
ID: 33921089
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
 

Author Comment

by:xmi
ID: 33936989
It's a form (fdm file installed on each computer).

Thanks
0
 
LVL 76

Expert Comment

by:David Lee
ID: 33982586
Have you tried using an .oft instead?
0
 

Author Comment

by:xmi
ID: 34091544
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 76

Expert Comment

by:David Lee
ID: 34091637
Yes, by editing and saving.
0
 

Author Comment

by:xmi
ID: 34229125
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
 
LVL 76

Expert Comment

by:David Lee
ID: 34229970
You're welcome.  No problem.
0
 

Author Comment

by:xmi
ID: 34305932
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
 
LVL 76

Assisted Solution

by:David Lee
David Lee earned 250 total points
ID: 34307099
Is "Allow script in Public Folder" enabled in the "E-mail Security" section of the Trust Center?
0
 

Accepted Solution

by:
xmi earned 0 total points
ID: 34318612
Yes, but "allow scripts in shared folders" was not enabled. It did the trick !

Thanks,
0
 
LVL 76

Expert Comment

by:David Lee
ID: 34318664
You're welcome.
0
 

Author Closing Comment

by:xmi
ID: 34358747
Issue solved.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Resolve DNS query failed errors for Exchange
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now