Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Mon, 29 May 2006 10:25:02 -0700,    group: microsoft.public.word.vba.addins        back       


VB6 COM add-in for MS Word 2000   
I want to create a COM Add-In for MS Word 2000 using VB6 that should perform 
the following:

1. Add in has a VB form that contains a VB6 toolbar control etc.

2. When user clicks on a commandButton on MS Word toolbar, the VB6 form pops 
up. The form is docked to the border of the Word document window during the 
editing of the document.

3. When a user clicks on a VB6 toolbar button, a certain text gets typed in 
on the Word document.

I can take care of item 3 above. I have read some MSDN articles like the 
following, but I am still unclear on item 1 and 2 above:
http://support.microsoft.com/kb/q238228/
http://www.microsoft.com/technet/prodtechnol/office/office2000/proddocs/opg/part2/ch11.mspx

NOTE: My actual task is much more complex, so I do not want to use Word 
templates as add-in.

Thank you in advance,
Nam
date: Mon, 29 May 2006 10:25:02 -0700   author:   Nam

VB6 COM add-in issue for MS Word 2000   
I was able to create a COM Add-In for MS Word by following the following 
article
http://support.microsoft.com/kb/q238228/

The only change that I made in the code for above article was that in the 
Designer window, I selected the application to be MS Word 9.0

I ENCOUNTERED THE FOLLOWING PROBLEM: Whenever I open the MS Word, it creates 
an additional copy of the command button on the toolbar. First time I open 
the MS Word, it creates one “My CuSstom Button” on the toolbar, second time I 
open MS Word, it creates another “My CuSstom Button” on the toolbar and so on.

The same example for Excel works fine and it does not create a new “My 
CuSstom Button” every time I open Excel.

What is I need to do to resolve the above issue for MS Word?

Thanks,
Nam


"Nam" wrote:

> I want to create a COM Add-In for MS Word 2000 using VB6 that should perform 
> the following:
> 
> 1. Add in has a VB form that contains a VB6 toolbar control etc.
> 
> 2. When user clicks on a commandButton on MS Word toolbar, the VB6 form pops 
> up. The form is docked to the border of the Word document window during the 
> editing of the document.
> 
> 3. When a user clicks on a VB6 toolbar button, a certain text gets typed in 
> on the Word document.
> 
> I can take care of item 3 above. I have read some MSDN articles like the 
> following, but I am still unclear on item 1 and 2 above:
> http://support.microsoft.com/kb/q238228/
> http://www.microsoft.com/technet/prodtechnol/office/office2000/proddocs/opg/part2/ch11.mspx
> 
> NOTE: My actual task is much more complex, so I do not want to use Word 
> templates as add-in.
> 
> Thank you in advance,
> Nam
>
date: Mon, 29 May 2006 14:15:01 -0700   author:   Nam

Re: VB6 COM add-in issue for MS Word 2000   
Hi,

I had a similar problem when I tried to add command buttons on
connection event and remove the buttons on disconnection event of my
COM addin.

The reason of button multiplication is that when you add your buttons,
you modify the Normal.dot (which is evil btw) and when you quit Word,
Normal.dot gets saved BEFORE the COM add-in disconnection event is
fired, so that removing the buttons has no persistent effect.

My solution was to switch from creating buttons in COM addin at runtime
to providing an additional macro-free DOT add-in which contains all the
buttons created at design time, and the COM addin only connects its
handlers to the buttons. In this manner you also resolve the problem of
modifying user's Normal.dot.

BTW you will find a lot of references to this issue in this newsgroup
if you search.
date: 30 May 2006 01:04:10 -0700   author:   Ignoramus

Google
 
Web ureader.com


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