Add-in problem for muliple documents

D

Dhananjay

Dear all,

Primary Situation ->
i am developing one word-addin through vb in which there is one
commandbar with 5 buttons & 1 combo. when word starts all the buttons &
combo should be disabled except wizard button which is first button.i
want to click first button viz. wizard button , to start wizard form &
getting bla bla bla i will finish the wizard . now the wizard button
will be disabled & others will be enabled. combo box will be filled up
with some values with wizard values ... i finish up the wizard &
creates a new document according to wizard values.so this is the
situation which i developed & which runs for new doc with new word
instance perfectly . now..


Question ->
when i click on new document in the same instance of word , the new
window will be open up but it will loose all integrity checks like
disable-enable buttons i.e. the new window will be filled up with the
same values in the combo , wizard button disabled & all others r
enabled.
 
C

Cindy M -WordMVP-

Hi Dhananjay,

Have you set a unique value for the TAG property of the command bar and
its controls? This sounds like what happens when you've forgotten to do
that. (There should be an article on it in the Knowledge Base on MSDN)
Primary Situation ->
i am developing one word-addin through vb in which there is one
commandbar with 5 buttons & 1 combo. when word starts all the buttons &
combo should be disabled except wizard button which is first button.i
want to click first button viz. wizard button , to start wizard form &
getting bla bla bla i will finish the wizard . now the wizard button
will be disabled & others will be enabled. combo box will be filled up
with some values with wizard values ... i finish up the wizard &
creates a new document according to wizard values.so this is the
situation which i developed & which runs for new doc with new word
instance perfectly . now..


Question ->
when i click on new document in the same instance of word , the new
window will be open up but it will loose all integrity checks like
disable-enable buttons i.e. the new window will be filled up with the
same values in the combo , wizard button disabled & all others r
enabled.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
S

Shinya

For my case i am always checking and enable/disable buttons at
m_wordAppEventDoc_WindowActivate
event as well as new document and open document event.

Shinya
 
D

Dhananjay

Hi Cindy,
Thanks for reply. As your reply I set unique TAG property of command
bar & its controls also. but ... I am still getting the same problem
when I start a new document from the same window... okay one another
question as newbie --- if I am going to develop a DLL in addin , it
should be invoked in the process area of the application. Now WORD is
one application which is EXE server , & it is creating the new document
object each time .. So now if I want to create a new instance of my DLL
for each document object then is there any way for that?
See ... PLEASE don't be angry with my silly question but tell me if
somewhere i am getting wrong

Thanks in advance
Dhananjay
 
D

Dhananjay

Hi Shinya,
Thanks for your reply. I checked this situation at windowActivate & new
and open document event . Also I checked it at the document change
event. So where is the problem ?
Thanks in advance,
Dhananjay
 
C

Cindy M -WordMVP-

Hi Dhananjay,
s your reply I set unique TAG property of command
bar & its controls also. but ... I am still getting the same problem
when I start a new document from the same window...
Have you read through these articles on MSDN?

http://support.microsoft.com/default.aspx?scid=kb;en-us;238228

http://msdn.microsoft.com/library/en-us/dnoffpro01/html/COMAdd-insPartII.
asp
okay one another
question as newbie --- if I am going to develop a DLL in addin , it
should be invoked in the process area of the application. Now WORD is
one application which is EXE server , & it is creating the new document
object each time .. So now if I want to create a new instance of my DLL
for each document object then is there any way for that?
The only way you could do that would be to have code in a Word VBA
project that would instantiate an object for the DLL and use call-backs
for the functions. Rather defeats the purpose of a DLL Add-in... The
proper technique is the one described in the articles above.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
D

Dhananjay

Hi Cindy.
Thanks a lot for reply , I get the proper way for my continuation. &
also I get the place where i was getting wrong ... sorry bad englisj.

Thanks again,
Dhananjay
 
J

JeRoK

I have the same problem about multiple word documents, but i can´t figure out
how to getting my addin reiniciate when i open a new document.

Can you, please, what you do to accomplish that?

Thanks in advance
JeRoK
 

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