何の為に?
URLを踏んだら、既定のDesktopアプリを開かせたい。
- Office には Web と Desktop アプリの二種類がある
- Office-URI-スキーマを使うと既定のプロトコルに登録した Desktop アプリで起動可能
- Office-URI-スキーマで、編集モードや閲覧モード、Templateからの生成なの起動を制御可能
インフォメーション
これらのプロトコルをそのまま使えるのは、HTML Mail やアプリなど限られてはいます。
Share/Teams/Yammer では貼り付けても無駄だったり、無視されたりします。
AutomateでTeamsへPostMessage by htmlでもダメでした。
基本
< scheme-name >:< command-name >"|"< command-argument-descriptor > "|"< command-argument >
scheme-name | 概要 |
---|---|
ms-word | Word |
ms-powerpoint | Power POint |
ms-excel | Excel |
ms-visio | Visio |
ms-access | Access |
ms-project | Project |
ms-publisher | Publisher |
ms-spd | SharePoint Designer |
ms-infopath | Infopath |
command-name | Full Spell | 概要 |
---|---|---|
ofe | Open For Edit | 編集 |
ofv | Open For View | 閲覧 |
nft | New From Template |
テンプレートから生成 s オプションで保存先指定可能 |
command-argument-descriptor | 概要 |
---|---|
u | 基本これ |
s | Template 生成時の保存先指定時 |
command-argument は、URI
利用例
Wordで編集
ms-word:ofe|u|https://www.soumu.go.jp/main_content/000488654.docx
Excelで閲覧
ms-excel:ofv|u|https://www.soumu.go.jp/main_content/000408218.xlsx
PowerPointで編集
ms-powerpoint:ofe|u|https://www.soumu.go.jp/main_content/000388591.pptx
WindowsMediaPlayerで再生
DLNA-PLAYSINGLE:ofv|u|https://www.soumu.go.jp/main_content/000487276.mp4
プロトコルごとの既定のアプリの調べ方
補足
SharePoint での起動アプリの設定をしたい場合は、サイト単位とドキュメント単位での起動設定があるので、基本はそちらで。
公式情報