Is there official clipboard access from office-js for Word add-in? - ms-word

I have reviewed the office-js docs and not found any formal way of working with the clipboard through a Word add-in.
I attempted to use the newer navigator.clipboard.writeText but it is automatically rejected by the internal Word browser (where the add-in is hosted) without prompting the user (like a browser does). I have not seen any associated support for permissions policy that can be used to communicate with Word that the add-in would like clipboard permissions.
So, I am resorting to the deprecated document.executeCommand('copy') for now, but am concerned that will get my add-in rejected by the MS App Store.
Is there an official/sanctioned way to use the clipboard from within a MS Word add-in?

OfficeJS doesn't provide anything for that. You may sill use the Document.execCommand() API which includes "copy", "cut" and "paste". But it was deprecated and may not work in the web browsers any longer.
Feature requests on Tech Community are considered, when the dev team go through the planning process. Use the github label: Type: product feature request at https://aka.ms/M365dev-suggestions .

It seems like there's one method Range.copyFrom of Excel rich client api. I can't find the alternatives either. Maybe you can ask to provide the new feature. Whether it could be in the future feature list or not may also take some time.

Related

Change signature in Outlook Web (OWA) with Powershell

Until now, I was using Set-MailboxMessageConfiguration in PowerShell to change OWA's signatures and it worked perfectly. No permission problems, no configuration problems, nothing.
Today, I was trying to update my signature with PowerShell but nothing happened, the signature in the browser is not changed at all.
But if I use Get-MailboxMessageConfiguration, the new signature is there:
I can see that now, it's possible to manage multiples signatures in OWA. But I can't find find any information about that. So, how I can modify the already existing signature? Or, how I can create a new signature?
----- Update 01/11/2021
It's a new feature that is not available for everyone yet. My company's O365 account has it, but my student (also 0365) and classic Outlook account doesn't.
So a third option is: How I can turn off this feature?
----- Update 01/11/2021
Still no defenitive solution.
There're some workarounds that may work. Here's the github issue (opened by #Lee) and the Microsoft's Tech Community discussion:
https://github.com/MicrosoftDocs/office-docs-powershell/issues/8537
https://techcommunity.microsoft.com/t5/windows-powershell/cant-no-longer-change-owa-s-signature/m-p/2907053
Answering the question relating to your third option "How can I turn off this feature," I opened a support ticket with Microsft for my tenant and they rolled this back for us for now. It took a few weeks to finally get sorted but we can now successfully use this command to set outlook web signatures. Our users no longer see the option to add multiple signatures on the web version.
In the final response, they mentioned that there may be a graph solution in the works for editing the multiple roaming signatures but couldn't offer an ETA.

word add-in using OfficeJs

We already developed Excel add-in using officejs with RESTful api with Batching in custom Functions.
And we wanted to achieve same in Word add-in hence kindly share example using word add-in with RESTful api.
As I understand it, you have a web API (REST architecture) and you have successfully made calls to it from an Excel custom function. Now you want to make calls to a web API from a task pane Word add-in. You should be able to do this exactly the same way that you do in the custom function. In fact, to start with, you should use the exact calling code and get the exact same data. The difference is only in the UI. You will probably want the calling code triggered by an event handler for a button in the task pane.
As per my knowledge, you need word manifest.xml file then all your business logic you can write using differences your addin by running inside excel or word
So officejs provide Host info to check running platform
I guess it will help

show diff on word documents

I'm designing a web application that will enable users to upload docx documents and will the show the diff between each revision.
I don't know how to approach the problem. Is it a bitmap, how do I decode the doc to show changes. Do Microsoft has an API I can use to simply send 2 word docs, and it will return the changes between the two?
I also have the same question on google docs. I think with google drive it's simpler. Saw this API
If anyone has done something similar or has an example to some similar app, I would be grateful.
Have you looked at Word's Compare tool? See under Review|Compare. Word's API also support the compare tool's automation (e.g. via VBA).
To use Word's API, you'll need to automate Word. For the details of the method, see: https://msdn.microsoft.com/en-us/library/office/hh128820(v=office.14).aspx
See also: https://code.msdn.microsoft.com/windowsdesktop/Compare-Two-Word-Documents-043b2e1d

What is the package name for Microsoft office word?

I'm trying to make an app that allows the user to put in information and then transfer the information over to Microsoft word to automatically organize it into an invoice. However, I cannot find the information about the Microsoft word app in order to do this. This website http://beta.appinventor.mit.edu/learn/reference/other/activitystarter.html states that you require the package name and class name, or the appropriate intent, in order to work an activity starter.
I'm using MIT App Inventor and I'm kind of new at this. Please help.
If you can't find the package/class name (online) for the application, you can't start an activity. Most likely that it is not open source, so it is not available for the public.
From http://ai2.appinventor.mit.edu/reference/other/activitystarter.html:
These can be App Inventor apps created by you or others. They can
also be apps like Camera and Maps that are pre-installed on the
device. Or they be any app at all as long as you have the
necessary information to provide to the activity starter.
For example:
To start an acitivity for the camera use the package android.hardware.camera2. (https://developer.android.com/reference/android/hardware/camera2/package-summary.html)
I don't know if you want to consider it, but you can also use FusionTables. The information you submit in your app will be inserted into a table in your Google Drive. (http://appinventor.mit.edu/explore/ai2/pizzaparty.html)

Adding to the browser user agent string?

I have a plug-in that handles its own url schema (something like mystuf:// ). If a user clicks on such a link when the plug-in isn't installed (s)he gets an ugly error. So I extended my installer to write into the Registry (for Internet Explorer) and the user.js (for Firefox) to ADD a custom string to the user agent string. These additions survive a browser upgrade nicely (Microsoft uses this technique to indicate the presence of the dotNet Framework).
Now I need to extend this to Apple Safari and Google Chrome on all supported platforms.
To be clear: I'm not looking how to REPLACE the user agent string, but how to amend it with additional information.
Any hint?
I faced a similar problem and I implemented this in the same way as apple do for iTunes as described in this SO question. Finding information on how to create the Firefox plugin was more tricky, but the answer to my question was a great help. The Firefox (or mozilla) plugin will be used by all mozilla based browsers (Firefox, Chrome, Safari) and you will therefore be able to use the same javascript to detect the firefox plugin in all of these browsers and therefore determine whether your plugin/custom protocol/application is installed.
As Google Chrome supports the Netscape Plugin API ( http://en.wikipedia.org/wiki/NPAPI ), the Firefox way might be a good starting point also there.