Instances Of Word

Add-in Express™ Support Service
That's what is more important than anything else

Instances Of Word
Multiple Instances of Word do not let drop down list boxes perform 
Derek Jee




Posts: 4
Joined: 2007-02-20
Hello

I am new to this forum, so apologies if I haven't entered this correctly.

I have an add in for Word which loads 2 drop down lists to a toolbar. The first list is populated by:

Me.AdxCommandBarDropDownList1.Items.Add("Addresses")
Me.AdxCommandBarDropDownList1.Items.Add("Applicant")
Me.AdxCommandBarDropDownList1.Items.Add("Diary")
etc..

and the second list is populated by adding items from an array based on the choice of the first, for example..

CodesArr(2, 234) = "Forwarding Address Line 4"
CodesArr(2, 235) = "Forwarding Phone Number"

Me.AdxCommandBarDropDownList2.Items.Add(CodesArr(2, i))

My problem is that when you have more than one instance of Word open, the population of the second instances drop down lists do not function properly. It is almost list the lists have been given a different ID and my code no longer works. If I close the first instance of Word, then the second one works... I am using VS2005 Visual Basic..

Also when I open Word, the first list is already populated with the item last used, and not what I want it to be when Word is opened up each time..

One more thing.. can I stop my add in from showing in my Outlook mail window if word is my editor?

Sorry to group these together, and thanks for any help in advance.

Regards,


Derek.

Posted 20 Feb, 2007 09:09:39 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Derek.

We have already fixed this problem in the latest Add-in Express 2007 version. Please upgrade the product up to v3.3.


P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 20 Feb, 2007 10:48:48 Top
Derek Jee




Posts: 4
Joined: 2007-02-20
Hi Sergey..
I have now upgraded and found the main problem has now been resolved.. Many thanks.. Can you let me know if you can answer the 2 small queries at the bottom of my initial message re Outlook and the list not reinitialising after opening Word again...#


Kind regards,


Derek.
Posted 01 Mar, 2007 05:42:17 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Derek.

You can use the ListIndex property of the ADXCommandBarComboBox component to initialize the control when Word starts.

As to Word in Outlook mail, please download the following example:
http://www.add-in-express.com/projects/wordeditorinoutlook.zip

Posted 01 Mar, 2007 10:36:48 Top
Derek Jee




Posts: 4
Joined: 2007-02-20
Hi Sergey

I have tried the ListIndex = 0,1,2 etc for my drop down list, but it seems to ignore it, and show the item which was showing when word closed...

My listindex code is after I have populated the drop down list after the InitializeComponent() call..

Please note it is a dropdown list and not combobox..

Also, and chance of that word in Outlook code in VB??>

Regards, :D


Derek.
Posted 02 Mar, 2007 13:36:31 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Derek.

Please try to set the ListIndex in the AddinStartupComplete event handler.
Posted 05 Mar, 2007 07:46:20 Top
Derek Jee




Posts: 4
Joined: 2007-02-20
fab.... never saw that property... it works a treat...

I did look at a few of the Word Editor in Outlook links, but they only had C+ examples.. can you get me on in VB? and then I will stop asking silly questions..

Many thanks again..


Derek.
Posted 05 Mar, 2007 07:59:13 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Posted 05 Mar, 2007 21:36:42 Top