index > Windows Desktop Search Development > Word Add-In creates problems with Desktop Search Preview

Word Add-In creates problems with Desktop Search Preview

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();
}
}
J_Craig

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

Paul Nystrom - MSFT
reply 2

You can use google to search for other answers

 

More Articles

• Is there a way to share a "Windows Desktop Share" Index...
• Have an idea for a Windows Desktop Search Technical Chat? Post it...
• Beta 2 indexing Windows Live Messenger contacts as jibberish
• Windows Desktop Serach Filter
• #msntb_toolbar_full_name#
• Any Fixes for Roaming Profiles with WDS yet?
• Problems searching with German IMEs
• The "SendUsing" configuration value is invalid
• USB smart card drivers in safe mode.
• Search from IE 6 Address Bar
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• No permission to use WDS!
• What are you developing using WDS?
• Protocol handler - AddDefaultUrl
• Onenote search results only shown as emp
• WDS3 indexing problem
• File format specifications
• Protocol Handler SDK? Need searchapi.h,
• Registration problem with Microsoft Outl
• IFilter qustion: Can I customize the dis
• Cannot install/re-install MS DeskTop Sea
• WDSQUERY in .NET 2.0 ->
• Searching offline storage??
• Indexing Business Contact Manager
• WDS Forum Users - Ever hear of Microsoft
• Problem crawling with a hierarchical cus

Hot Articles

• Fix for roaming profiles
• Where can i find column list file for WD
• WDS never finishes indexing
• Using and querying custom property sets/
• No permission to use WDS!
• WDS Shutdown Issues
• IFilter Preview
• Requirements for WDS
• Hotkey assignment
• How to calculate the mailbox hash to con
• URL Field encoding in 2.6.5?
• how to get a "summary" or a &q
• ibm0007.exe error
• WDS web search results in Firefox
• #msntb_toolbar_full_name#

Recommend Articles

• Outlook 2007 Beta 2 and EntryID Futures?
• Search syntax problems
• Unable to search mapped network drives l
• WDS & Sharepoint
• Running as a service
• Indexing never ends with Norton Protecte
• Using and querying custom property sets/
• Add a new location to wds3
• limit on number of files indexed?
• Need VPN Client Software
• Protocol Handler startup problems
• WDS 3.0 beta 2 experiences
• Column definitions for WDS 2.6.5?
• What are you developing using WDS?
• Cannot install/re-install MS DeskTop Sea