Text not appearing in a textbox for Outlook 2003 custom form

J

John Riddle

Hello All,

I've searched high and low for a solution to this. I have a custom contact
form that we have been using since Outlook 2000 (we're now using outlook
2003). There are many custom fields on this form, but one in particular we
do all of our searching on. Its a "Resume" field (standard textbox). It has
always worked perfectly. The problem now is that since converting our entire
organization to Outlook 2003, when we do a search for words in a contact's
"resume" field, the search will produce the correct number of results, but
when opening the contacts to view their resume, the field is blank. If I add
the "Resume" field to the folder view and view the contact without opening
it, I can see that the field is populated just find with the information,
however when opening the item, the field is empty.

This only occurs with about 20% of the items opened.
On on of our users, he could see almost none of the "Resumes" returned after
doing a search. I realized he was using "Favorites" folders and removed all
entries and told him not to mess with "Favorites" folders. This seemed to
bring him up to speed with all the other users (only about 20% of the items
show an empty "Resume" field for him now).
I've cleared the forms cache for all users. I've deleted the frmcache.dat
file and all other folders in the containing folder with no benefit.
I've tried re-creating the form from scratch in Outlook 2003, publishing it
under a different name and then converting all (20,000) items in the folder
to use the new forms message class with no benefit.

I'm at my wits end! Has ANYONE seen this type of behavior before and more
importantly can anyone tell me how to fix it???

Thanks in advance,

John
 
S

Sue Mosher [MVP-Outlook]

FWIW, there is now a hotfix for the forms cache problem with forms in PF
Favorites folders. See http://www.slipstick.com/dev/index.htm

The only time I've seen fields turn up blank is when the form is too
complex, i.e. it has too many fields or formulas, and then it happens all
the time on a particular item.

How are you performing this search?
 
J

John Riddle

Sue,

Thank you very much for the response. I've tested a few other things based
on what you've said:

1. I went to the page you specified and clicked on the two hotfix links. The
problems described were not what I was experiencing.
2. I created a new form with only the "Resume" field added. (to ensure that
my form was not over complicated or too many fields) And then published it
to another folder. Moved a few of the problem contacts into it. Tried to
open the form (after adding the field to the folder). Still no luck.

I'm REALLY frustrated with this. I've spent weeks migrating us from Exchange
5.5 to Exchange 2003 and from Outlook 2000 to Outlook 2003. It is beginning
to appear that I'll have to move everything back to the old set-up as there
appears to be no answer to this problem.

Any other ideas?

John
 
J

John Riddle

Sue,

Okay, I've found the problem. The solution, however may be much more
complicated. It seems that there is too much text in the "Resume" field. By
adding a column "size" to the folder view and opening items larger than 36K
(no Resume text displayed) and then opening items smaller than 36K (Resume
text displays for all items). This seems to have identified the problem, but
how do I fix this? I can search on the text in the resume and the proper
search results appear. However, when opening up the items listed in the
results, we need to be able to see the data. Can anyone suggest a work
around? I can place a button on the form to launch NotePad and somehow
retrieve the data outside the form from the exchange server directly? The
data is obviously in the Exchange server. Is there ANY way at all to
retrieve and view it (either within or outside the custom form)? Extended
MAPI?

I don't know anything about about Extended MAPI or really any other method
to retrieve this data outside the standard Outlook Object Model, so if you
have a suggestion, a code sample would be very much appreciated.

Thanks,

John
 
J

John Riddle

Ken,

Thanks. After looking at your answer, I was somewhat overwhelmed. Decided to hold of on getting into Redemption til I had some time on my hands. This weekend, however I did decide to give it a go and was able to do exactly what I need (Could grab the text from a field even when holding more than a mb of text) and place it in the custom field on my form no problems at all.

Here's the only code in my item_open :

dim utils, Candidate, PrResume, theResume
set utils = CreateObject("Redemption.MAPIUtils")
set Candidate = Item
PrResume = &H8239001E
theResume = utils.HrGetOneProp(Candidate.MAPIOBJECT, PrResume)
Item.UserProperties("Resume") = theResume

After diving into Redemption and solving this problem and several others that were vexing me (populating a combobox with the names of contacts in PF's holding more than 15,000 contacts in under a couple seconds), I'm really excited about all the possibilities that Redemption offers a VB guy (just about a year experience) like me.

I've posted another question starting a new thread for another issue that I thought I was forced to accept, but now I'm hopeful I do not. Could you look at that one for me?

Thanks Sue. Thanks Ken.

John
 
K

Ken Slovak - [MVP - Outlook]

Two things to bear in mind when using MAPITable filters that I've found.

One, the property tag for a named property may be different for different
folders and certainly for folders in different InfoStores. And they would be
different for different transports (Exchange, no Exchange). So always get
the property tag you need on the fly or get it once and store it for each
folder in a collection keyed by folder EntryID for each Outlook session.

In the example I showed I use a procedure to get the property tag for the
reminder flag and pass that procedure the EntryID and StoreID of the folder
I'm looking at. Dmitry has examples on the Redemption Web site of how to get
the property tag.

Second, if you are working with properties that are either named properties
or properties that aren't always included in an item (such as the reminder
flag for example) then use a clause in the filter that checks to see if the
property exists in the item. You can see examples of that both on Dmitry's
Web site and if you use OutlookSpy you can see that for the search folder
conditions for the Reminders folder.

Using MAPITables to get items is blazingly fast. This is just an estimate
but I consider a CDO 1.21 search using a MessageFilter to be about an order
of magnitude faster than an Outlook object model search using a Restricted
Items collection and SetColumns. MAPITable's seem to be an order of
magnitude faster than using CDO, so effectively you are getting results
about 100 times faster than using the Outlook object model. Setting up the
table filter takes quite a few lines of code but once it's all set up the
execution time is excellent.




John Riddle said:
Ken,

Thanks. After looking at your answer, I was somewhat overwhelmed. Decided
to hold of on getting into Redemption til I had some time on my hands. This
weekend, however I did decide to give it a go and was able to do exactly
what I need (Could grab the text from a field even when holding more than a
mb of text) and place it in the custom field on my form no problems at all.
Here's the only code in my item_open :

dim utils, Candidate, PrResume, theResume
set utils = CreateObject("Redemption.MAPIUtils")
set Candidate = Item
PrResume = &H8239001E
theResume = utils.HrGetOneProp(Candidate.MAPIOBJECT, PrResume)
Item.UserProperties("Resume") = theResume

After diving into Redemption and solving this problem and several others
that were vexing me (populating a combobox with the names of contacts in
PF's holding more than 15,000 contacts in under a couple seconds), I'm
really excited about all the possibilities that Redemption offers a VB guy
(just about a year experience) like me.
I've posted another question starting a new thread for another issue that
I thought I was forced to accept, but now I'm hopeful I do not. Could you
look at that one for me?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top