Hello All,
Sorry for the long post, but I wanted to be somewhat clear. I'm developing a Word (2003) Add-In for an IM management system which handles the DocumentBeforeSave event, and runs a Windows Form to aid in attaching metadata to the document (mainly for XP). It also gives the user the ability to cancel the save event. Everything is working well with the Add-In, but when I tested it with various technologies before deploying, I found a problem with Desktop Search.
When the Desktop Search generates a preview of a word document, it triggers the DocumentBeforeSave event, thus running the form. If the user simply adds the metadata when prompted by clicking OK, there is no real problem (other than the hassle of having this popup in a preview as the form is only supposed to pop-up when the user is using the SaveAs command, which Desktop Search is doing (the SaveAsUi value is set to true)). The major problem occurs when the user cancels the save event (which seems to be many people's instinct in this context). The DocumentBeforeSave event seems to be triggered again, calling the form again. If the user cancels a 2nd time, then Desktop Search says that the Word preview is not available. Worse than this, the document remains active in the background, not appearing in the processes or on the desktop, but using the form's resources. This causes resource access problems. When shutting down, the OS asks whether you'd like to save theWord documents whose save functions were cancelled during preview. If you say no, then it complains that something called "CiceroUIWndFrame" is not responding and you must "EndNow"... Also, word recovers these documents the next time it is opened, even though the documents were not misplaced. I assume that Desktop Search is caching these in order to speed preview, and triggers the DocumentBeforeSave event in the process.
I haven't come across any easy solutions so far, (e.g. there doesn't seem to be an easy way from within Word to detect whether the event was triggered by the Desktop Search system). Since I'm deploying this in a large organization which allows modifications like individual users installing the MSN Search toolbar, I need to find a solution, and preferably one that can be solved either by network installs (e.g. a change to the toolbar that is installed on all machines) or a change to my code (thus avoiding requiring users to perform some task).
Thanks in advance (the code for the handling of the DocumentBeforeSave event follows).
Craig.
void applicationObject_DocumentBeforeSave(Microsoft.Office.Interop.Word.Document Doc, ref bool SaveAsUI, ref bool Cancel)
{
MessageBox.Show(Cancel.ToString());
if (SaveAsUI == true)
{
saveDoc = Doc;
Cancel = true;
SaveAsUI = false;
try
{
control.ShowDialog();
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
if(control.Dialog.DialogResult == DialogResult.Cancel)
{
MessageBox.Show("You must fill out the metadata form in order to save!!!\nThe save has been cancelled");
}
else
{
Cancel = false;
SaveAsUI = true;
}
control.CloseDialog();
}
}

Word Add-In creates problems with Desktop Search Preview
HughLeslie
Do you have teh solution to this problem Where to find it.
I have the problem with windows desktop search I loaded from the Windows Desktop Search 3.01 for Windows XP (KB917013)
Word promts message to save normal.dot in previewing the search results.
Reijo Orava
sparkab
Hi. I'm having the same problem but with excel application. There is some kind of solution fot thisCoc Patrick
Here's another input on this. It doesn't have to be MicrosoftR Word-related! When closing my Win XP Home SP2 a couple of nights ago, I also was obstructed by the said msg, that the Cicero thing was not responding. It might be worth noting, that Word is not installed and had not been running on my system - here's why: Although I purchased and installed MicrosoftR Office 2003R Student Edition for my wife to use, about a year-and-a-half ago, it happened about last August that a virus (or something) got into my system and corrupted something and the shop (reputable) to which I took it, told me that it would take a wipe-and-reload to straighten it out. So, I am $115.00 sadder but pleased that it works again. The data folders and files were intact, but I have to reinstall everything other than WindowsR XP. And I have now installed most of my old programs, but I was laid off in a contract cancellation a year ago and had to move out of state, 800+ miles away, to find a job, last Winter-Spring, and since the move's disorganization, I haven't located my CD-ROM and magic number to reinstall my MicrosoftR Office 2003R Student Edition. So, I am confident that it's not just a hole in my personal memory-bank that doesn't recall running Word that evening. Also, note, it occurred when closing down Win XP while working in XP's Guest account, that doesn't have Admin privileges. This has not occurred again, nor had I ever seen this Cicero-thing named anywhere before. And also, I have not been making any add-ins or any changes to my Word. Now, last but not least, Word exists on the hard drive, and every time I forget and hit its shortcut (on desktop), it nags me to give it the magic activation code, and I am still searching for that, just not searching very hard (but I think I will find it pretty soon). Maybe, maybe I had accidentally activated this at soeme earlier time.
Hope this helps.
C NOOB
My work around was to develop a completely different solution using Task Panes and not using the SaveAs. Disappointing because of the lost work hours and I don't understand why the DeskTopSearch development team would want to trigger the SaveAs event (seems like bad practice) but anyways... So no answers to the other Cicero stuff... Sorry I can't be of more help...
Craig.
Rene Alexander
J-Craig,
We've looked into this a bit, but can't as yet, come up with a solution (there might not be a supported solution). We're going to spend a bit more time on it to see if a better answer is available.
Paul Nystrom - MSFT
MyerTheFlyer
Bummer about getting laid-off. I know the feeling. The thing about contracts is that they end.
I have gotten this cicerouiwndframe error when shutting down XP pro. I have not verified but it seems like i get it when I have gotten one of those inexplicable messages from Word that you have changed the default.dot template. I never save chages to that unless I have conciously made a change. As it is asking during shutdown, it pops up message box over message box with the "end now" options. This seems related. I found a few more references to cicerouiwndframe in the KB that I am checking out.
My guess is it is related to using word as the email editor in outlook and may be doing something like you ran into above.
Good luck on the next contract
RTS4ME
I found the solution, the problem happend when the Excel try to save the document, but can't for x reason. So i decided to go for the easy way and when the user stops the application I simply kill the process runing for the back.
Obviusly the user don't need those excel im exterminating.
It's a not good practice work around, but when there is a deadline and a
client in the way there is no much time for better research.