Just wondering if I am experiencing an expected behavior - when I open my MS Word Web add-in and I want to close the document it prompts me if I want to save changes even I haven't changed anything on purpose. Let me know if there is a way not to pop up that dialog.
Thanks,
AU
Related
I am developing a Word Add-in application that should work on Word application for both Windows and Mac. I have a problem specific to Word on Mac, while Word on Windows and Word online work as expected.
For business logic reasons my add-in application needs to create and update hyperlinks in the word document. The hyperlink gets updated once the user clicks on it in the document. However, the default behaviour of the Word on Mac is to automatically navigate user to the browser with the hyperlink URL, once he/she clicks on the hyperlink. Incidentally, if you press CMD + click on a Mac, you won't be navigated away from the application.
Is it possible to programatically (using Office/Word Api from the JS driven add-in application) prevent that kind of behaviour on hyperlinks when clicked?
If not, is it possible to capture and cancel the cursor click event on the hyperlink? Or capture it and maybe emit a new event which would simulate "CMD + click", with effect to not navigate from the document?
I've written a custom ribbon for word. In my winForms-application I also open a word document with word-Interop to create some texts with word.
When I use normal word documents my ribbon is shown correct but when I open the document in my application then the ribbon is gone.
I found out that it is somehow disabled in the COM-AddIn-Options in Word. When I reactivate it manually it appears.
How can I reactivate it programmatically?
[Update]
For better understanding: I have two solutions.
1) A AddIn for Word which displays a ribbon
2) A winform-application which has a winword-control which loads word in it.
When the second one is started the first one is not available anymore.
To answer your question, it's not possible to programatically re-enable your add-in from the add-in itself. Think about it - it doesn't get loaded, so its code won't get run. So nothing you put in your code will re-enable the addin, because it won't get executed.
The only way would be to create a watchdog process that checks if the COM add-in has been disabled every 10 minutes or so, and re-enables it. You'll need to know where Word stores those settings though.
Could you tell me please how it is possible to:
somehow disable editing an open document?
or get notified when the user is about to change the current document?
like some document management apps do: while the document is checked in they:
do not allow modifications to it or
when user tries to modify it he will be notified that the document is checked in so it should be checked out first
Set the document protection type to WdProtectionType.wdAllowOnlyReading which is similar to opening word document from Email, Internet or SharePoint portal.
When the use click the Edit anyway yellow bar in the top ProtectedViewWindowDeactivate Event will occur where you can raise an alert.
Making a word document of our network set-up.
We have about 7 servers and I need to include screenshots and other info on each.
Is it possible to have a pic of the server that when clicked will open up another word doc that reveals all of the other info. Can this then be mailed to someone easily?
I think that you should have actually tried to do it in Word before asking. The answer is trivial. For completeness sake:
Right-click on the image, choose "Hyperlink..." from the menu. Select the document you want from the resulting standard file selection dialog.
That's it. Doing ctrl-click on the pickture will open up the document selected though you will probably get a security warning first.
You can also do it from a VBA macro. First select the desired image and then:
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:= _
"C:\Users\me\Documents\a-document.doc", SubAddress:=""
So you could automate the process of server discovery (or maybe you have the data in a spreadsheet that you could use), adding images and hyperlinks automatically. Probably not worth it for just 7 servers.
I'm not clear what you mean by the last part about emailing. Do you want to email the Master word document or the one opened after clicking on the hyperlink? Either way, Word has a menu option for doing this.
If you are wanting to send the document that is opened from the hyperlink - do you actually need the user to open that document or would you rather email it directly? A simple macro can be written that will ask you for the target email address and send the document directly without having to open it. There are really too many possibilities to write down here - we need more information.
Is there a way to autonumber when you open up visio or ppt? I need a number to count on the slide in ppt and in a shape in visio. I have tried insert excel that has a macro that will do what I want it to do but I can't get it to work when you open up visio/ppt. All I want is a number count to display when I open up the document.
You can do this in PowerPoint:
Insert > Header/Footer...
Check the Slide Numbers box.
PowerPoint doesn't have any mechanism for running code automatically in response to a user opening a document file. You pretty much need to write an add-in that traps and responds to events like users opening a file, and the add-in must be installed on each user's PC where you expect this to work.
For Visio, this this MSDN Article:
Visio: How to Use Background Pages to Set Up Automatic Page Numbering may be of assistance.