Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
developer
active.documents
automation
binary.file_format
clipboard.dde
com.add_ins
hosting.controls
internet_other
office.sdks
officedev
officedev.other
outlook.forms
outlook.vba
smarttags
vba
web.components
  
 
date: 28 Oct 2005 07:43:07 -0700,    group: microsoft.public.office.developer.active.documents        back       


smartdocuments all use the same instance of the dll   
Hi,

I am working with smartdocument technologies in VB.net, and the problem
I am having is that when 2 or more smartdocuments are opened, they use
the same instance of the dll, because word uses the same process for
all open documents.

This means I cannot have global variables, and when the user clicks on
the task pane, there is no way of identifying in which document the
action has been called.

The events OnListOrComboSelectChange(), OnCheckboxChange() etc.. that
handle task pane actions, have no parameters that allow me to identify
the document. Document's filepaths are unique, so I could use that, but
to get the filepath of the document you need to create a word object
and set it to a documentpath..

The only solution I can think of is having the filepath in an xml tag
in the document, and read that attribute whenever I need to identify
the document.

If anyone can think of a better solution, I'd love to hear about it.

Thanks, 

Sylvain.
date: 28 Oct 2005 07:43:07 -0700   author:   Sylvain

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us