2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Office-URI-スキーマ: ブラウザではなくデスクトップアプリを開かせる 

Posted at

何の為に?

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

プロトコルごとの既定のアプリの調べ方

  1. スタート画面で「既定」と入力
  2. 「既定のアプリ」を選択
  3. 「プロトコルごとに既定のアプリを選ぶ」を選択
  4. 使いたいアプリとプロトコルを調べる
    image.png

補足

SharePoint での起動アプリの設定をしたい場合は、サイト単位とドキュメント単位での起動設定があるので、基本はそちらで。

公式情報

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?