How to store variables within Word Add-In accessible only for the current Word instance

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

How to store variables within Word Add-In accessible only for the current Word instance
 
Mark Williams




Posts: 21
Joined: 2020-06-08
Sorry I meant start screen.

OLE and Word is a nightmare. Was my original option, but it just causes too many problems with modern word. It just about works with one ole container open as long as you keep it on your main screen and also do not open panels such as the search panel etc. If you do you when you close the panel Word doesn't refresh to vacate the empty space. Only way I found to overcome that 9provided you can detect that it has closed) was to reload the document, which is pretty useless. Once you open to containers and use secondary monitors, you are into a whole world of pain! So I abandoned it and went for COM.
Posted 11 Aug, 2020 05:37:24 Top
Andrei Smolin


Add-in Express team


Posts: 17360
Joined: 2006-05-11
Mark Williams writes:
I've unchecked splash screen, but it still shows.


Make sure you don't have an extra WINWORD.EXE in processes after you close Word. You can also restart the machine.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Aug, 2020 10:31:49 Top
Mark Williams




Posts: 21
Joined: 2020-06-08
Managed to retrieve the default behaviour (not sure how). Seemed a bit counter-intuitive as I'm trying to get rid of it!

Your suggestion that I open a document and close it appears to be working. Awesome. Thanks.
Posted 12 Aug, 2020 13:30:44 Top
Mark Williams




Posts: 21
Joined: 2020-06-08
Andrei Smolin writes:
Word (and Excel) does this only with the first document (Document1, Book1) created by default. Create a new document and get rid of Document1.

I have discovered that this technique only works when Word is opened from a shortcut. If the user uses any open command from my word instance, it is opened in my Word instance. I have disabled almost all functionality for opening documents, but I cannot find a way of disabling or hiding the functionality on the backstage view alongside the "Home" item. Is this possible?
Posted 16 Aug, 2020 08:30:35 Top
Mark Williams




Posts: 21
Joined: 2020-06-08
I have found a handy webpage which shows the idmsos for the excel backstage through office's various progressions ie 2010, 2013, 2016. Largely the same for Word.

The link is https://www.rondebruin.nl/win/s2/win005.htm.

The idmso for the home tab on backstage was PlaceTabHome.
Posted 18 Aug, 2020 06:45:43 Top
Andrei Smolin


Add-in Express team


Posts: 17360
Joined: 2006-05-11
Hello Mark,

All IdMso's available are listed in Excel files described in section "Referring to built-in Office ribbon control" at https://www.add-in-express.com/docs/net-ribbon-components.php#referring-built-in-ribbon-controls.

I suggest that you hide all (well, almost all) built-in Ribbon controls using the StartFromScratch property of the add-in module.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 18 Aug, 2020 08:55:00 Top
Mark Williams




Posts: 21
Joined: 2020-06-08
Hi Andrei,

Thanks. I wasn't aware of that property. But it is only those functions that allow the user to open a new/existing document that I wish to disable and that seems manageable via a few backstage tabs and ribbon commands.
Posted 18 Aug, 2020 10:07:21 Top