Toggling Addins in MSWord(2003)

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13108
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Toggling Addins in MSWord(2003)

Post by ChrisGreaves »

Code: Select all

Function AddinToggle(strAddinFullname As String)
    Dim addinLoop As AddIn
    For Each addinLoop In AddIns
        Debug.Print addinLoop.Name
        If addinLoop.Name = UW.strGetNameExtent(strAddinFullname) Then
            AddIns(strAddinFullname).Installed = False
            AddIns(strAddinFullname).Delete
            Exit Function
        Else
        End If
    Next addinLoop
    AddIns.Add FileName:=strAddinFullname, Install:=True
'Sub TESTAddinToggle()
'    Call AddinToggle("T:\Greaves\Products\USER\Billt\Billt084.dot")
'End Sub
End Function
I am still putting this through its paces.
I have fourteen user applications in my Word2003\StartUp folder, and 11 toolbar menus on my screen.
Untitled.png
Some of these applications I use several times per day. Others ("BillT", "Proje") are used once a week or less.
I am looking at reducing the time to load MSWord and starting useful work, amongst other things,

Related threads:-
Order in which global addins are loaded
Opening AddIns (Word 2003)
Identifying un-installed AddIns (Word/VBA 2003) (Solved?)

Cheers
Chris
You do not have the required permissions to view the files attached to this post.
Last edited by ChrisGreaves on 06 Dec 2021, 04:45, edited 2 times in total.
Don’t let a good crisis go to waste

User avatar
Charles Kenyon
4StarLounger
Posts: 455
Joined: 10 Jan 2016, 15:56
Location: Madison, Wisconsin

Re: Toggling Addins in MSWord(2003)

Post by Charles Kenyon »

Hi Chris,

Take a look at this code. Doug Robbins posted it this week about one of the Ribbon versions, but I think it could be used. Perhaps come up with yet another Add-In with a custom toolbar. One button for each of your Add-ins?

Code: Select all

Sub ToggleAddin()
    ' Doug Robbins 2021-11-28
    '   https://answers.microsoft.com/en-us/msoffice/forum/all/customui-tabs-adding-to-customize-the-ribbon/7ccfea3f-deb5-4410-befe-dc0245f6ea16
    '   You could toggle the Add-in on and off by using a macro. However, it would need to be in a second Add-in
    '       or the Normal.dotm template and have a button on the ribbon to run it.
    '
    With Application.AddIns("AddinName.dotm")
        If .Installed = False Then
            .Installed = True
        Else
            .Installed = False
        End If
    End With
End Sub
(I just got done saving it in my code snippets when I read your question.)

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13108
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Toggling Addins in MSWord(2003)

Post by ChrisGreaves »

Charles Kenyon wrote:
02 Dec 2021, 03:27
... One button for each of your Add-ins?[/code]
Thank you, Charles, for this feedback/confirmation.

After posting that procedure I let my mind wander a bit and came up with this (attached) before I retired for the night. I am pleased that I came up with the same idea as you.
I have over 150 projects of which I estimate 1/3 to be active and useful to me on an occasional basis, so the ability to activate an application on demand seems like a winner to me!

Addin is my five-letter name for the project. The nine anticipated slave procedures exist and are in use in my MRUse project, so it is Full Steam Ahead!

Cheers
Chris
You do not have the required permissions to view the files attached to this post.
Don’t let a good crisis go to waste

User avatar
Charles Kenyon
4StarLounger
Posts: 455
Joined: 10 Jan 2016, 15:56
Location: Madison, Wisconsin

Re: Toggling Addins in MSWord(2003)

Post by Charles Kenyon »

To be loaded as an Add-In, itself, would this not need to be a .dot file?
I see, it is a module in your normal.dot.


Looks like you are well on your way. It builds your toolbar automatically based on criteria you've set.

I no longer have a working copy of 2003. (or 97, 2000, 2002, 2007, 2013, 2016, or 2019. Still have 2010 and 365. I still miss the ability to position toolbars. Ain't progress grand! I have grown to like the Ribbon interface, though. It is very customizable so long as you do it in that position. Userforms still work.

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13108
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Toggling Addins in MSWord(2003)

Post by ChrisGreaves »

Charles Kenyon wrote:
02 Dec 2021, 13:14
I still miss the ability to position toolbars. Ain't progress grand!
Untitled.png
Tell me! I shanghaied my best-fit algorithm into use years ago ...

I remember when the ribbon was announced (2007?) and MS said that its purpose was to reclaim screen real-estate. Their axiom was that users screens were cluttered with too many toolbars.
I measured the ribbon as "four toolbars high".
In all my time delivering training and servicing clients I could not recall seeing anything other than "Standard" and "Formatting" on a user screen. As far as users were concerned, if it wasn't on those two out-of-the-box toolbars, it did not exist as an action that could be taken in MSWord (or Excel or ...).

I blogged back then that the Ribbon was the tail-fins of 2007, and further that it estranged the thousands of tech support-like people from using their expertise to assist users over the telephone.
I think that it is significant that (to the best of my understanding) fifteen years later the keyboard commands are unchanged with the ribbon. That the ribbon was, essentially a cosmetic change that hid more than it revealed.

Sigh!
Chris
You do not have the required permissions to view the files attached to this post.
Don’t let a good crisis go to waste

User avatar
Jay Freedman
Microsoft MVP
Posts: 1181
Joined: 24 May 2013, 15:33
Location: Warminster, PA

Re: Toggling Addins in MSWord(2003)

Post by Jay Freedman »

Chris, I was at the 2006 MVP Summit where Office 2007 was previewed, and most of us were aghast at the damage that was being done to productivity. In private, several of the 'Softies said that the driving motive for the ribbon was that the largest corporate customers wanted to lock down the Office UI -- to make it as nearly non-customizable as possible. Their IT departments were having to spend too much time with each user who reported a problem, because everybody had a different set of buttons on their toolbars, in different places and with different shortcuts.

User avatar
BobH
UraniumLounger
Posts: 8505
Joined: 13 Feb 2010, 01:27
Location: Temple - Deep in the Heart of Texas

Re: Toggling Addins in MSWord(2003)

Post by BobH »

So . . . it sounds to me like productivity for most all users was sacrificed at the altar of the help desk productivity. Sounds reasonable to me . . . :flee:
Bob's yer Uncle!
(1/2)(1+√5)
Intel Core i5, 3570K, 3.40 GHz, 16 GB RAM, ECS Z77 H2-A3 Mobo, Windows 10 >HPE 64-bit, MS Office 2016

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13108
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Toggling Addins in MSWord(2003)

Post by ChrisGreaves »

Jay Freedman wrote:
03 Dec 2021, 02:07
... Their IT departments were having to spend too much time with each user who reported a problem, because everybody had a different set of buttons on their toolbars, in different places and with different shortcuts.
... and The Business did not want to spend funds training the users in anything other than "Introduction to MSWord".
Jay, I found your confirmation so unsettling that I had problems dropping off to sleep. :half-grin:
I came to realise that productivity was low when class members would protest that "you can't do that because it is not on either toolbar". I had trouble sleeping nights back then, too.
BobH wrote:
03 Dec 2021, 03:40
So . . . it sounds to me like productivity for most all users was sacrificed at the altar of the help desk productivity. Sounds reasonable to me . . .
'Twas ever thus.
I once suggested to a client/colleague of 20 years standing that instead of walking him through his size-of-embedded-image problem over the phone, I come down and deliver a 1/2-day class to six of his staff.
"Oh no!", came the confident reply, "I've been using Word for twenty years now. I think I've got a pretty good grip on it".
"Really?" I responded, "What's your favourite field code?"
<pause>
"What's a field code?"

I gave up.
I am so easily discouraged.
Cheers
Chris
Don’t let a good crisis go to waste

User avatar
Jay Freedman
Microsoft MVP
Posts: 1181
Joined: 24 May 2013, 15:33
Location: Warminster, PA

Re: Toggling Addins in MSWord(2003)

Post by Jay Freedman »

BobH wrote:
03 Dec 2021, 03:40
So . . . it sounds to me like productivity for most all users was sacrificed at the altar of the help desk productivity. Sounds reasonable to me . . . :flee:
Oh, absolutely. When you realize where the largest part of the income from Office came from at the time (before Microsoft 365 subscriptions), it makes perfect sense.

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13108
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Toggling Addins in MSWord(2003)

Post by ChrisGreaves »

ChrisGreaves wrote:
01 Dec 2021, 22:18
...I am still putting this through its paces.
But I thought to post a record in the form of a link to my first working version. (WORD2003, remember).

http://chrisgreaves.com/Downloads/20211204_0751.zip

The Application Document contains a brief description of what it is, how it works.
I dragged the module "modAddIns" from my Normal.dot back to the Application Document; you can try running directly from the application, or drag the module into your own Normal.dot.
The two simple addins are included.
The WhatFAQ indicates that I think I have to resolve issues with some of my ancient applications that commandeer the Standard toolbar.
My awfull-est part of the code is using twenty dummy macros as a means of tying the Tag of my drop-down menu bar to the individual templates. Suggestions welcome.
I use a library of utility procedures and have included a Rob-Bovey stripped-down version of that library.

And now, back to work. Thank heavens we have strong winds, snow flurries etc forecast all day today. I can get a LOT of coding done :laugh:

Cheers
Chris
Don’t let a good crisis go to waste

User avatar
Charles Kenyon
4StarLounger
Posts: 455
Joined: 10 Jan 2016, 15:56
Location: Madison, Wisconsin

Re: Toggling Addins in MSWord(2003)

Post by Charles Kenyon »

Thank you for the working version.
So . . . it sounds to me like productivity for most all users was sacrificed at the altar of the help desk productivity. Sounds reasonable to me . . .
The thing is, it is not "most users;" it is the users who really take the time to learn the program to at least an intermediate level. In my experience, like yours, that group is a small minority of users.

Most users do know some buttons to push. In the Ribbon version they may know how to shift tabs. They do not know fields; they do not have a grasp of styles nor of templates. Much Word training is on fancy bells and whistles and does not give a solid background of the basics. Modifying and creating toolbars, ribbon tabs, and writing rather than recording macros is beyond the pale. It is very frustrating, to those of us who have taken that time, to have the rules changed just when things are working.

User avatar
Charles Kenyon
4StarLounger
Posts: 455
Joined: 10 Jan 2016, 15:56
Location: Madison, Wisconsin

Re: Toggling Addins in MSWord(2003)

Post by Charles Kenyon »

Not practical for distribution but much simpler for me...

I just checked. I have 32 Add-Ins load at startup in Word 2010. I have 23 load at startup in Word 2021 (365).

I have any Add-Ins that I will use for anything in a separate folder inside my Word Startup folder for one of my Word versions. I then copy any that I want loaded all the time and paste as shortcuts in my Startup folder for any version desirable. The same Add-Ins are used for multiple versions of Word. If I need one not loaded already, I add it via the Templates and Add-Ins dialog. (Each version of Word has separate Startup and User Templates folders.)

The ones I routinely load are already listed in that dialog but not checked. I can simply check one of those to load it. I can add others fairly quickly. The one thing I could do to make this quicker would be to add a keyboard shortcut or QAT button to get to the Templates and Add-Ins dialog. I think I will do that today.

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13108
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Toggling Addins in MSWord(2003)

Post by ChrisGreaves »

Charles Kenyon wrote:
04 Dec 2021, 18:20
Thank you for the working version.
Thank you, Charles, but if anyone besides me can get that u/l version to run, I salute them. It was posted more as a proof-of-concept than anything. I haven't even sorted the procedures etc and the documentation is still being done. I will post a cleaner version in about a week's time if/when I have run it that long.
I just checked. I have 32 Add-Ins load at startup in Word 2010. I have 23 load at startup in Word 2021 (365).
Ah!
But you see, I no longer need a Word Startup folder at all!
My Startup folder has been replaced by the menu on the "Addin" menu bar. That toggles the various applications ON and OFF, and they can stay where I think that they belong - in their respective project folders.

This technique will likely cause me problems when I start using my libraries of routines. For example my general-purpose library UW536.DOT is known to every application as "UW.DOT" in the startup folder. I used to roll in a new version UW537.DOT, rename it to UW.DOT and everybody was happy, but now: if I upgrade my UW from UW536 to UW537 then I should edit each application and change its Tools, References.

I am still mulling over this. I have a dBase056.dot that is a wizard at handling MSAccess file data, FileR183.dot which does sweet things with the file system, and so on. There are 63 Developer project folders and 117 User project folders, and while not all of them are functioning, about a quarter of them are, and probably 90%+ make use of "UW.DOT", so this is something I must mull over.

In the meantime, for the rest of tomorrow and the rest of the Day Of Rest I shall continue to use AddIn to add in all the projects that were in my Startup folder, and see how we go.

The speed of loading Word2003 is vastly improved, I suspect in part because Word2003 doesn't feel as if it has to sniff around 14 user applications, and partly because the virus scanner doesn't have to sniff through 14 user applications on this wood-chip fueled steam-driven hard drive!

Cheers
Chris
Don’t let a good crisis go to waste

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13108
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Toggling Addins in MSWord(2003)

Post by ChrisGreaves »

Charles Kenyon wrote:
04 Dec 2021, 15:21
Much Word training is on fancy bells and whistles ...
Was it only AmiPro 3.0 that had the "local formatting paintbrush"? :flee:
Cheers
Chris
Don’t let a good crisis go to waste

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13108
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Toggling Addins in MSWord(2003)

Post by ChrisGreaves »

Jay Freedman wrote:
03 Dec 2021, 02:07
... wanted to lock down the Office UI -- to make it as nearly non-customizable as possible.
I can no longer quote from my copy of The Underground Guide To Word For Windows"(1), but I will paraphrase.

One of the smartest decisions Microsoft ever made was to make Word customizable to the extent that users can change the way every command operates.
If anyone still has a copy of that monumental work, you will find the original text in the first chapter (unless it is in the Introduction/Preface), and within the first five hundred words of that section, I believe.

Woody was talking about Word6.0 in those days, but my "ShowAll" macro was the first Word6.0 macro I upgraded when I switched to Win95/Word97.

One of my testaments to Woody Leonhard:-

Code: Select all

Public Sub ToggleShowAll()
    ''' Comments:   Use the current "Show Fields" setting (True or False) to toggle all visibility settings.
    If Documents.Count > 0 Then
        Dim boolSet As Boolean
        boolSet = Not ActiveWindow.View.ShowFieldCodes
        With ActiveWindow.View
            .ShowAll = boolSet
            .ShowFieldCodes = boolSet
            .ShowHiddenText = boolSet
            .ShowTabs = boolSet
            .ShowSpaces = boolSet
            .ShowParagraphs = boolSet
            .ShowBookmarks = boolSet
        End With
    Else
    End If
End Sub
Woody certainly knows how to take care of Users Interests. :clapping:

(1) Credit Card required
Cheers
Chris
Don’t let a good crisis go to waste

User avatar
John Gray
PlatinumLounger
Posts: 5126
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Toggling Addins in MSWord(2003)

Post by John Gray »

Malwarebytes Browser Guard blocks that site (which allegedly needs only a free registration rather than a credit card) or one it links to:
Website blocked due to fraud
Website blocked: www .9gg23.com
Malwarebytes Browser Guard blocked this website because it may contain malware activity.
We strongly recommend you do not continue.
John Gray

“The only difference between reality and fiction is that fiction needs to be credible.” - Mark Twain.

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13108
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Toggling Addins in MSWord(2003)

Post by ChrisGreaves »

John Gray wrote:
05 Dec 2021, 16:27
Malwarebytes Browser Guard blocks that site ... We strongly recommend you do not continue.
Thanks John.
This confirms my skepticism.
I have long believed that when a "free" offer requires a credit-card number (or even one penny in payment), it probably isn't really free at all!
Your review via Malwarebytes shows this to be true.
Cheers :cheers: :chocciebar:
Chris
Don’t let a good crisis go to waste

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13108
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Toggling Addins in MSWord(2003)

Post by ChrisGreaves »

Jay Freedman wrote:
03 Dec 2021, 02:07
... largest corporate customers wanted to lock down the Office UI -- to make it as nearly non-customizable as possible.
I now see "Conspiracy Theory" everywhere I look:
https://docs.microsoft.com/en-us/office ... ns-enabled
"Group policy will always override user settings and users are prevented from changing add-in settings for add-ins that have been configured by the group policy List of Managed Add-ins"
Morosely yours
Chris
Don’t let a good crisis go to waste

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13108
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Toggling Addins in MSWord(2003)

Post by ChrisGreaves »

ChrisGreaves wrote:
01 Dec 2021, 22:18
I am still putting this through its paces.\
www.chrisgreaves.com/Downloads/20211210_1151.zip holds a document Addins008.doc with a module modAddins.
Drag the module modAddins into your Normal.dot, if you care to.

I have reduced the thing greatly; gone is the menu bar etc. Now at Start and at Exit I monitor the Addins Collection and copy it to the INI file.
The Addins collection (Tools, Addins pane) will remain constant across Word's exit and reload.

I no longer use a Startup folder.
Cheers
Chris
Don’t let a good crisis go to waste

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 13108
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Toggling Addins in MSWord(2003)

Post by ChrisGreaves »

ChrisGreaves wrote:
01 Dec 2021, 22:18
I am still putting this idea through its paces.
I have been using the system for about a month now. It is in essence a means for remembering which of a set of Addins in the Tools, Addins list was toggled ON in the previous session, and making sure that it is again toggled ON at the start of the current session. There is NO startup folder; all Addins are Remote. There are benefits in that each Addin can remain in its own folder - there is no need to have a copy in a Startup folder.

I notice no human-eye measurable difference in load time of MSWord.

I have noticed a slight increase in macro execution time at certain times. An Example:
One of my Addins is my Under.dot, based on Woody Leonhard's "Underground Guide to Word For Windows". Hundreds of macros written by me since around 1995.
Under.dot is on my list of Tools Addins and stays toggled ON. I use those macros throughout each day.

This morning I went to use my "ProperTitle" macro, a substitute for Word2003's "Change case" command. This was my first use of an Under macro in the session of Word, and it seemed to take some time for the macro to execute.

This makes me wonder whether Tools, Addin templates are treated differently according to whether they are in the Startup folder (I no longer use that) or whether they are Remote (housed in their own development folder).

I suspect but cannot yet show, that Startup templates are opened and tokenized when Word is loaded, but that Remote templates are only opened, and are not tokenized until the first time a macro is run from that template.
If my supposition is correct, and if I could demonstrate it with timings, then my initial premise of time-saving will be satisfied; that is, Remote templates do not need to be tokenized unless they are used.

I suspect still that my main savings in time is the reduction in time spent by me manually copying templates back-and-forth between my Startup folder and my Remote folders.

Cheers
Chris
Don’t let a good crisis go to waste