次の方法で共有


Office 2010 の Backstage ビューについて (開発者向け)

概要 : Microsoft Office 2010 で導入された Microsoft Office Backstage ビューは、Office Fluent ユーザー インターフェイスでの最新の革新であり、リボンの付属機能です。ここでは、Backstage を構成するコンポーネントと、さまざまな Office アプリケーションに Backstage を拡張する方法を示すシナリオについて説明します。

適用対象: Excel 2010 | Office 2007 | Office 2010 | Open XML | PowerPoint 2010 | SharePoint Server 2010 | VBA | Word 2010

Microsoft アイコンFrank Rice (Microsoft Corporation)

2010 年 4 月

適用対象 : Microsoft Access 2010、Microsoft Excel 2010、Microsoft InfoPath 2010、Microsoft OneNote 2010、Microsoft PowerPoint 2010、Microsoft Project 2010、Microsoft Publisher 2010、Microsoft SharePoint Designer 2010、Microsoft Visio 2010、Microsoft Word 2010

目次

  • Microsoft Office 2010 Fluent Backstage ビューの概要

  • Backstage ビューで使われる用語

  • Backstage ビューのコンポーネント

  • Backstage ビューの拡張性

  • Open XML ファイルを使用した Backstage ユーザー インターフェイスのカスタマイズ

  • 共有 COM アドインの作成による Backstage ビューのカスタマイズ

  • よく寄せられる質問

  • Backstage ビューのコントロールの説明、属性、および子情報

  • まとめ

  • その他の技術情報

Microsoft Office 2010 Fluent Backstage ビューの概要

Microsoft Office system の 2007 リリースでは、ファイル レベルの機能には、Office ボタンをクリックすると表示される Office メニューでアクセスできました。

Microsoft Office 2010 では、Office ボタンは [ファイル] タブに置き換えられています。[ファイル] タブをクリックすると、Microsoft Office Backstage ビューが表示されます。Backstage ビューでは、リボンのドキュメント作成機能に含まれない機能を見つけて使用することができます。リボン、ミニ ツール バー、およびギャラリーはすべて、ドキュメント内での作業に利用できます。Backstage ビューは、ドキュメントを操作するときに利用できます。

Backstage ビューは開発者が自由に拡張でき、ユーザー インターフェイス (UI) をニーズに合うようにカスタマイズできます。また、特筆すべきは、Backstage の UI は、リボンで使われているものと同じファイル、コールバック、多くのコントロールを使用してカスタマイズできるということです。したがって、リボンの UI のカスタマイズに既に慣れている開発者は、同じスキルを使用して、組織のニーズに合った Backstage UI を作成できます。

Backstage UI は、Office Fluent UI をサポートするすべての Microsoft Office 2010 アプリケーション、つまり Microsoft Access 2010、Microsoft Excel 2010、Microsoft InfoPath 2010、Microsoft OneNote 2010、Microsoft PowerPoint 2010、Microsoft Project 2010、Microsoft Publisher 2010、Microsoft SharePoint Designer 2010、Microsoft Visio 2010、および Microsoft Word 2010 に存在します。以下では、新しい UI の構造、および独自のカスタム Backstage UI を実装するために必要な詳細について説明します。

Backstage ビューで使われる用語

この記事でよく使われる用語を次に示します。

  • Backstage ビュー: 作業中のドキュメントに対するファイル レベルの機能を表示する全画面のユーザー インターフェイス モデルです。Microsoft Office Fluent ユーザー インターフェイスの一部であり、レイヤー化されたメニュー、ツール バー、および作業ウィンドウから成るこれまでのシステムに代わるものです。

  • 確定コマンド: Backstage ビューからドキュメントに戻るコマンドです。確定コマンドが呼び出されると、Backstage ビューは閉じます。[保存]、[名前を付けて保存]、[印刷] などは確定コマンドの一例です。

  • ファスト コマンド: 左側のナビゲーション バーに表示されるコマンドで、共通の機能にすばやくアクセスできます。[保存]、[名前を付けて保存]、[閉じる] などはファスト コマンドの一例です。

  • タブ: 特定のタスクを対象とする Backstage ビュー内のページです。Backstage ビューは、最上位レベルの一連のタブで構成されます。先頭 (一番上) のタブが既定です。位置を指定しないと、カスタム タブは、すべての既存のタブとファスト コマンドの下の、ナビゲーション バーの最下部に追加されます。Backstage ビューに表示できるタブの数の上限は 255 です。

  • グループ: Backstage タブの内部の関連する機能をグループ別に整理するために使用する UI コンテナーです。

Backstage ビューのコンポーネント

ここでは、Backstage ビューのコンポーネントについて説明します。図 1 を見てください。Office 2010 アプリケーションを起動してまず目に付くものの 1 つが新しい [ファイル] タブで、これは Office ボタンに代わるものです。[ファイル] タブをクリックすると、Backstage ビューが表示されます。Alt + F キーを押して Backstage ビューを開くこともできます。

図 1. 新しい [ファイル] タブ

Microsoft Office ボタン

図 2. のように、Backstage の左側には、ファスト コマンド ([保存] や [開く] など) とタブ ([情報] や [最近使用したファイル] など) が配置されたナビゲーション バーがあります。

図 2. Backstage ビュー

[ナビゲーション] タブ

ファスト コマンドを使うと、タブと明示的に関連付けられていない、よく使用されるタスクにアクセスできます。

タブには共通のタスクに関連する機能がまとめられており、それがグループのセットとして 1 つまたは 2 つの列に配置されています ([互換モード] と [権限] など)。

Backstage ビューの拡張性

Backstage ビューは、ドキュメントのプロパティ、作成、出力の機能の向上した操作環境をユーザーに提供するだけでなく、IT 部門やサードパーティの開発者がカスタム ドキュメント管理機能を提供するために接続できる場所でもあります。Backstage ビューの機能拡張には、いくつかの一般的なシナリオがあります。

  • ソリューション プロバイダーは、一連のビジネス データを Backstage ビューに追加できます。

    • ソリューション プロバイダーは、まったく新しいタブを作成し、使用中のファイルに関する大量の情報を表示できます。

    • ソリューション プロバイダーは、グループを既存のタブ (特に [情報] タブ) に追加して、情報を目立たせることができます。

  • ソリューション プロバイダーは、Backstage ビューに新しい機能を追加できます。

    • ソリューション プロバイダーは、このカスタム機能を対象とした新しいタブを作成できます (たとえば、迷惑メール管理)。

    • ソリューション プロバイダーは、既存のタブが新しい機能の論理的なホームである場合は、そのタブにカスタム機能を追加できます。また、新しい機能が頻繁に使用されるもので、単一のボタンを使って表すことができる場合は、ファスト コマンドとして新機能を使用できます。

リボン UI の機能拡張に慣れている開発者は、Backstage ビューの機能拡張も基本的に同じファイルと構造を使用するので、苦労しないはずです。コンポーネントを Backstage ビューに追加するには XML を使用し、機能をコンポーネントと関連付けるにはコールバック プロシージャを使用します。

注意

リボンの機能拡張の詳細については、3 部構成の記事「Customizing the 2007 Office Fluent Ribbon for Developers」を参照してください。

XML によるカスタム Backstage ビューの内容と構造の定義

リボン UI の場合と同様に、Backstage ビューの構造とコンポーネントは XML マークアップを使用して定義します。次の例では、Word 2010 の Backstage ビューをカスタマイズする XML マークアップ ファイルの一般的な形式を示します。その後のセクションでは、このマークアップについて詳しく説明します。このマークアップにより、図 3 に示すようなカスタマイズされた Backstage ビューが作成されます。

図 3. この例で作成されるカスタム Backstage タブ

[カスタム] タブ領域

注意

Backstage ビューのマークアップと同じ XML ファイルに共存できることを示すため、リボン UI を変更するための XML も含めてあります。

<?xml version="1.0" encoding="utf-8" ?>
<customUI xmlns="https://schemas.microsoft.com/office/2009/07/customui" onLoad="OnLoad">
  <backstage>    
   <tab id="testArea" insertAfterMso="TabInfo" label="Sample Scenarios" columnWidthPercent="30" >
      <firstColumn>
         <group id="grpOne" label="Group One" helperText="This is helper text for Group One">
            <primaryItem>
               <button id="firstButton" label="Primary Button" onAction="SampleCallback" />
            </primaryItem>
      <topItems>
            <layoutContainer id="layoutOne" layoutChildren="vertical">
               <editBox id="firstEBox" label="Sample Edit Box"  text="This is sample text" alignLabel="topRight" />
               <button id="sampleButton" label="Sample Definitive Button" isDefinitive="true" imageMso="FileDocumentInspect" />
            </layoutContainer>
      </topItems>
         </group>
         <group id="grpTwo" label="Group Two" visible="true" >
             <primaryItem>
                <menu id="menuOne" label="DropDown Menu">
                   <menuGroup id="menuGrpOne" >
                      <button id="btnOne"  label="Button one" />
                      <button id="btnTwo" label="Button two" />
                      <checkBox id="chkBoxOne" label="Sample Check Box" />
                   </menuGroup>
                </menu>
     </primaryItem>
             <topItems>
                <editBox id="secondEBox" text="Disabled Edit Box"  enabled="false"/>
                <imageControl id="imgControlOne" imageMso="BlogHomePage"/>
                <groupBox id="grpBox" label="Group Box with Check Boxes and Radio Group">
                   <checkBox id="chkBox1" label="A Check Box" />
                   <checkBox id="chkBox2" label="Disabled Check Box" enabled="false" />
                   <radioGroup id="rdoGrp" label="Nested Radio Group" >
                      <radioButton id="firstRadioBtn" label="1st Radio Button"/>
                      <radioButton id="secondRadioBtn" label="2nd Radio Button"/>
                      </radioGroup>
                </groupBox>
             </topItems>
          </group>
      </firstColumn>
      <secondColumn>
         <group id="grpThree" label="Group Three" visible="true">
            <topItems>
               <comboBox id="firstCBox" label="Sample Combo Box" >
                  <item id="itema" label="Cat"/>
                  <item id="itemb" label="Dog"/>
                  <item id="itemc" label="Fish"/>
               </comboBox>
               <layoutContainer id="layoutTwo" layoutChildren="vertical">
                  <editBox id="thirdEBox" label="Part of vertical layout" />
                  <editBox id="fourthEBox" label="Part of vertical layout" />
                  <editBox id="fifthEBox" label="Part of vertical layout" />
               </layoutContainer>
               <layoutContainer id="layoutThree" layoutChildren="horizontal">
                  <button id="anotherButton" label="Horizontal layout" imageMso="NewAppointment" />
                  <hyperlink id="hyperLink" label="You can place a link here"/>
                  <button id="lastButton" label="Horizontal layout" />
               </layoutContainer>
            </topItems>
          </group>
      </secondColumn>
   </tab>
</backstage>

<backstage> 要素は、Backstage UI のカスタム構造を区切ります。階層的には、<backstage> 要素は <customUI> 要素の内部で許される 4 つの最上位要素の 1 つです。同じレベルで使用できる他の要素は、<ribbon>、<contextMenus>、および <commands> です。

<backstage> 要素の内部では、ファスト コマンド (<button> 要素で表されます) と <tabs> をホストできます。この例の Backstage には、1 つの <tab> 要素が含まれます。<tab> 要素には、次のような複数の属性が含まれます。

  • id: タブの ID です。

  • insertAfterMso: カスタム タブの挿入位置の前にある組み込みタブの ID です。この例では、カスタム タブは [情報] タブの後に追加されます。

  • label: タブに表示されるテキストです。この例では、タブのラベルは「Sample Scenarios」です。

  • columnWidthPercent: タブ領域の最初の列の幅を、パーセントで指定します。2 つの列の幅は合計で 100% になるので、1 番目の列を 30% に設定すると、2 番目の列は全体の幅の 70% になります。

このタブは、ラベルが付けられて、組み込みの [情報] タブの後に配置されます。

注意

Microsoft Office Fluent UI の XML カスタマイズ マークアップでは、キャメルケース表記法が使用されます。つまり、複数の単語をスペースなしで記述し、先頭の単語以外の各単語の 1 文字目を大文字にします。onAction や insertBeforeMso はこの表記法の例です。

各 <tab> 要素は、1 つまたは 2 つの列を含むことができます。この例では、カスタム タブの Sample Scenarios には、2 つの列が含まれます。さらに、各列では複数の <group> 要素をホストできます。この例では、1 列目には 2 つのグループ (Group OneGroup Two) があり、2 列目には 1 つのグループ (Group Three) があります。<group> 要素でも、id、label、visible、enabled、helperText などをはじめとする多くの属性を指定できます。

注意

コントロール要素とそれに関連する属性、要素の子、および他の情報の一覧については、この記事の後半を参照してください。

概念的にはカスタム Backstage グループはリボンのグループと似ていますが、重要な違いが 2 つあります。第 1 に、リボンのグループとは異なり、Backstage のグループでは、内容を厳密に (最大) 3 つの行に配置する必要はありません。この例には複数のさまざまな <layoutContainer> 要素が含まれており、構造とリッチなレイアウト機能を提供していますが、3 行の制限はありません。この要素に含まれる layoutChildren 属性を使用すると、要素に含まれる子オブジェクトを左右または上下のどちらに並べるかを指定できます。第 2 の違いは、リボンのグループとは異なり、Backstage のグループはオプションで <primaryItem> 要素を含むことができます。この要素は <button> または <menu> のどちらかです。<primaryItem> を使用すると、グループの中心となる要素として、ボタン (Group One の内側のプライマリ ボタンなど) またはメニュー (Group Two の内側のドロップダウン メニューなど) を指定できます。

サンプルの <button> 要素を見ると、含まれる属性の 1 つに isDefinitive があります。この属性を true に設定した場合は、ボタンをクリックするとコールバックがトリガーされ、Backstage ビューが閉じられて、ドキュメントに戻ります。XML の他の部分を見ると、複数のコンポーネントがあり、さまざまな属性が定義されています。結果として作成されるカスタム タブは、図 3 のようなものです。

コールバックによる機能の追加

サンプルをもう一度見てもらうとわかるように、ボタンをクリックすると、onAction 属性で指定されているコールバック サブルーチンがトリガーされます。ボタンからトリガーされる簡単なコールバックの例を次に示します。

Sub SampleCallback(ByVal control As IRibbonControl)
   MsgBox "You clicked the " & control.Id & " button. "
End Sub

この場合、プロシージャが呼び出されるとき、Microsoft Office は呼び出し元のコントロールを表す IRibbonControl オブジェクトを渡します。IRibbonControl オブジェクトのプロパティには、Id と Tag が含まれます。コードで示されているように、Id プロパティを使用することで、同じプロシージャを別のコントロールから呼び出すことができます。すべてのコールバック プロシージャは IRibbonControl オブジェクトを受け取り、トグル ボタンの押下状態のような他のプロパティを含むこともできます。

以下のセクションでは、Backstage ビューをカスタマイズする手順を、Open XML 形式ファイルを変更するドキュメント レベルと、Microsoft Visual Studio でマネージ コードに作成される COM アドインを使用するアプリケーション レベルについて示します。ドキュメント レベルで Backstage ビューをカスタマイズする手順の場合は、前のセクションで説明した XML を使用できます。COM アドインの場合は、別の XML を使用して Backstage ビューを変更します。

Open XML ファイルを使用した Backstage ユーザー インターフェイスのカスタマイズ

ドキュメント レベルの場合、XML マークアップを使用して Microsoft Office Fluent UI をカスタマイズするプロセスには、次の手順が含まれます。前のセクションで説明した XML マークアップを使用して、これらの手順を実行できます。

注意

Office の Open XML ファイル構造で行われることを理解する必要はありますが、これらの手順は省略できる場合があります。Office 2007 Custom UI Editor (英語) を利用できます。このツールを使用すると、ドキュメントを開き、(Office 2007 または Office 2010 を対象とするパーツと共に) カスタム UI を挿入して、XML マークアップと共にドキュメントを保存できます。この例で示されている手順を自動的に実行してくれます。また、カスタム アイコンを customUI フォルダーに追加し、アイコンを参照しやすくすることもできます。

Open XML 形式ファイルを使用して Backstage ビューの内容と構造を定義するには

  1. デスクトップに customUI という名前のフォルダーを作成します。

  2. 任意のテキスト エディターで、新しいコンポーネントを Microsoft Office Fluent UI に追加したり、既存のコンポーネントを変更したり、コンポーネントを非表示にしたりする XML マークアップを記述して、カスタマイズ ファイルを作成します。この記事で先に示した例の XML マークアップを使用します。作成したフォルダーに customUI14.xml という名前でファイルを保存します。

  3. カスタム Microsoft Office Fluent UI スキーマに対して XML マークアップを検証します (省略可能)。

  4. Microsoft Word 2010 でドキュメントを作成し、Open XML マクロ対応のファイルとして .docm という拡張子で保存します。ユーザーが Microsoft Office Fluent UI のカスタマイズと対話するときに対応するコードを追加する場合は、マクロ対応の形式でドキュメントを保存する必要があります。

  5. Word を終了します。

  6. Microsoft Windows Explorer でドキュメント ファイル名に拡張子 .zip を追加した後、ファイルをダブルクリックし、圧縮されたフォルダーとして開きます。

  7. デスクトップから zip フォルダーに customUI フォルダーをドラッグして、カスタマイズ ファイルをコンテナーに追加します。

  8. .zip フォルダーからデスクトップに _rels フォルダーをドラッグします。.rels ファイルを含む _rels という名前のフォルダーが、デスクトップに表示されます。

  9. 新しいフォルダーを開き、テキスト エディターで .rels ファイルを開きます。

  10. 最後の <Relationship> 要素とそれを閉じる <Relationships> 要素の間に、次の例で示すような、ドキュメント ファイルとカスタマイズ ファイルの間の関係を作成するコードを追加します。フォルダー名とファイル名を正しく指定してください。Id 属性では、customUI ファイルに対する一意の関係 ID を指定します。一意である限り、値は何でもかまいません。

    <Relationship Type="https://schemas.microsoft.com/office/2010/relationships/ui/extensibility" Target="/customUI/customUI14.xml" 
      Id="customUIRelID" />
    
  11. .rels ファイルを保存した後、それを圧縮されたファイルの _rels フォルダーにドラッグし、既存の .rels ファイルと置き換えます。

  12. .zip 拡張子を削除して、ドキュメントを開きます。

ブックにコールバックを追加して、Backstage ビューの機能を持たせるには

  1. [開発] タブをクリックし、[Visual Basic] をクリックします。

    注意

    [開発] タブが表示されない場合は、このオプションを設定する必要があります。アプリケーションでそれを行うには、Microsoft Office ボタンをクリックし、[Excel のオプション] をクリックして、[リボン] をクリックし、[タブのコマンドの配置] ボックスで [開発] オプションを選択します。これは、Microsoft Office Fluent UI を実装するすべての Office アプリケーションでユーザーを開発者として識別するグローバル設定です。

  2. Visual Basic Editor で、[ThisDocument] をダブルクリックしてコード ウィンドウを開きます。

  3. 次の例で示すような VBA 関数を入力します。

    Sub SampleCallback(ByVal control As IRibbonControl)
       MsgBox "You clicked the " & control.Id & " button. "
    End Sub
    
  4. ドキュメントを保存して Visual Basic Editor を閉じます。

  5. Microsoft Office ボタンをクリックし、[サンプル シナリオ] タブをクリックします。

  6. [Primary Button] ボタンをクリックします。図 4 のようなダイアログ ボックスが表示されます。

    図 4. [Primary Button] をクリックすると表示されるダイアログ ボックス

    プライマリ ボタンをクリックした後のダイアログ ボックス

共有 COM アドインの作成による Backstage ビューのカスタマイズ

COM アドインを使用して Microsoft Office Fluent UI を変更することもできます。UI カスタマイズを組み込み、マネージ コードを使用する COM アドインを作成するときは、2 つの選択肢があります。Microsoft Visual Studio 2008 に含まれる共有アドイン テンプレートを使用して、標準的な COM アドインを作成できます。または、Microsoft Visual Studio 2005 Tools for Office Second Edition をインストールしてある場合は、標準の共有アドインよりいくつかの点で優る COM アドインを作成できます。

特に、Microsoft Visual Studio 2005 Tools for Office Second Edition を使用して作成したアドインは、異なるアプリケーション ドメインで動作し、プログラミング モデルがより単純で、共有アドイン テンプレートを使用するより保守が容易です。詳細については、「共有アドインから Visual Studio Tools for Office アドインへの移行」を参照してください。

ただし、以下の手順では、標準共有アドインを使用してマネージ Microsoft Word COM アドインを作成します。共有 COM アドインと Microsoft Visual Studio 2005 Tools for Office Second Edition を使用してカスタム Microsoft Office Fluent UI を作成する方法の詳細については、「2007 Office Fluent リボンをカスタマイズする (開発者向け) (パート 1/3)」を参照してください。

この COM アドインは、図 5 のようなカスタム Backstage タブを作成します。

図 5. コントロールに関する複数の技法を示すカスタム Backstage ビュー タブ

サンプル コントロールを含む Backstage ビュー

共有 COM アドインを作成して Microsoft Office Fluent UI を変更するには

  1. Microsoft Visual Studio 2008 を起動します。

  2. [ファイル] メニューの [新規作成] をポイントし、[プロジェクト] をクリックします。

  3. [新しいプロジェクト] ダイアログ ボックスの [プロジェクトの種類] ウィンドウで、[その他のプロジェクトの種類] を選択し、[機能拡張] をクリックして、[共有アドイン] を選択します。

  4. [名前] ボックスに「BackStageCOMAddin」と入力して [OK] をクリックし、プロジェクトを作成します。

  5. 共有アドイン ウィザードの最初のページで、[次へ] をクリックします。

  6. [プログラミング言語の選択] ページで、[Visual C#] または [Visual Basic] を選択して、[次へ] をクリックします。

  7. [アプリケーション ホストの選択] ページで、[Microsoft Word] 以外のすべての選択をオフにして、[次へ] をクリックします。

  8. [名前および説明の入力] ページで、名前に「BackStageCOMAddin」と入力し、説明に「Update the Word Backstage View」と入力して、[次へ] をクリックします。

  9. [アドイン オプションを選択します] ページで、[ホスト アプリケーションの読み込み時にアドインを読み込む] をオンにして、[次へ] をクリックし、[完了] をクリックします。

Visual Studio によって、2 つのプロジェクト (アドイン自体とセットアップ プロジェクト) を含む新しいソリューションが作成されます。セットアップ プロジェクトを使用すると、他のユーザーのコンピューターにアドインをインストールでき、設計時のアドインのインストールとアンインストールが容易になります。

Word 2010 および Microsoft Office Fluent UI オブジェクト モデルと対話するには、次のようにタイプ ライブラリの参照を設定する必要があります。

タイプ ライブラリへの参照を追加するには

  1. ソリューション エクスプローラーで、[参照] フォルダーを展開します。[参照] フォルダーが表示されない場合は、[プロジェクト] メニューの [すべてのファイルを表示] をクリックします。

  2. Microsoft.Office.Core の参照を削除します。

  3. [参照] フォルダーを右クリックし、[参照の追加] をクリックします。

  4. [COM] タブをクリックし、[Microsoft Office 14.0 Object Library] を選択して、[OK] をクリックします。

  5. コード画面の先頭に、次の例に示すようなステートメントを追加します。

    Imports Office = Microsoft.Office.Core
    Imports Word = Microsoft.Office.Interop.Word
    
    using Office = Microsoft.Office.Core;
    using Word = Microsoft.Office.Interop.Word;
    

XML カスタマイズ ファイルを作成するには

  1. [プロジェクト] メニューの [新しい項目の追加] をクリックします。

  2. [新しい項目の追加] ダイアログ ボックスで、[XML ファイル] を選択します。新しいファイルの名前を customUI14.xml にして、[追加] をクリックします。

  3. 新しい XML ファイルに、次の例に示すような XML マークアップを追加します。

    <customUI xmlns="https://schemas.microsoft.com/office/2009/07/customui" onLoad="OnLoad">
      <backstage>
        <tab id="testArea" label="Sample Scenarios" columnWidthPercent="30" insertAfterMso="TabInfo" visible="true" >
          <firstColumn>
            <group id="grpOne" label="Group One">
              <primaryItem>
                <button id="btnSimToggleButton" label="Simulate Toggle Button" getImage="toggleImage" onAction="simToggleButton"/>
              </primaryItem>
              <topItems>
                 <layoutContainer id="layoutOne" layoutChildren="vertical">
                    <editBox id="eboxTextTarget" label="Text From Button"  getText="getToggledText" alignLabel="topRight" />
                    <button id="btnInsertText2Doc" label="Insert Text Into Document" isDefinitive="true" onAction="insertText2Doc"/>
                    <editBox id="eboxTextSource" label="Gets Inserted into Document" text="Hello World" onChange="getInsertText"/>
                 </layoutContainer>
              </topItems>
            </group>
            <group id="grpTwo" label="Group Two" getVisible="getInitGroupVisibility" >
              <primaryItem>
                <menu id="menuOne" label="Drop Down Menu">
                  <menuGroup id="menuGrpOne" >
                    <button id="btnShowEditBox"  getLabel="getHideShowEBoxLabel" onAction="showHideEditBox"/>
                    <button id="menuButtonTwo" label="Swap Images" onAction="SwapImages"/>
                    <checkBox id="chkEnableDisableEBox" getLabel="switchChkBoxLabel" onAction="chkEnable"/>
                  </menuGroup>
                </menu>
              </primaryItem>
              <topItems>
                 <editBox id="eboxEnabledDisabled" text="Hello World"  getEnabled="getEBoxEnabledState"/>
                 <editBox id="eboxShownHidden" text="See me now?" getVisible="getEBoxVisibility"/>
                 <imageControl id="imgControlOne" getImage="getControlImage"/>
                 <groupBox id="grpBox" label="Group Box">
                    <checkBox id="chkBox1" getLabel="getChkBox1Label" onAction="grpChkBox1Action"/>
                    <checkBox id="chkBox2" getLabel="getChkBox2Label" onAction="grpChkBox2Action"/>
                    <radioGroup id="rdoGrp" label="Nested Radio Group"  getEnabled="getrdoEnableByChkBox" onAction="radioGrpAction">
                      <radioButton id="firstRadioBtn" label="1st Radio Button"/>
                      <radioButton id="secondRadioBtn" label="2nd Radio Button"/>
                    </radioGroup>
                 </groupBox>
                 <editBox id="eboxVisiblebyChkBox" text="See me" getVisible="getEBoxVisibleByChkBox"/>
              </topItems>
            </group>
          </firstColumn>
          <secondColumn>
            <group id="grpThree" label="Group Three" visible="true">
              <topItems>
                 <layoutContainer id="layoutTwo" layoutChildren="vertical">
                    <comboBox id="cboPopulateBox" label="Populate Edit Box" onChange="populateEBox">
                      <item id="item1" label="one"/>
                      <item id="item2" label="two"/>
                      <item id="item3" label="three"/>
                    </comboBox>
                    <editBox id="eboxPopulate" getLabel="getEBoxLabel" getText="getCBOXText"/>
                 </layoutContainer>
                 <layoutContainer id="layoutThree" layoutChildren="vertical">
                    <button id="btnHideGroup" getLabel="getHideGroupBtnLabel" onAction="hideGroup"/>
                 </layoutContainer>
              </topItems>
            </group>
          </secondColumn>
        </tab>
      </backstage>
    </customUI>
    
  4. ファイルを保存して閉じます。

プロジェクトのリソース ファイルでリソースとして取り扱う場合は、XML ファイルを使用するのが最も簡単です。

プロジェクト リソースとして XML ファイルを追加するには

  1. ソリューション エクスプローラーで、customUI14.xml を選択します。

  2. プロパティ ウィンドウで [ビルド アクション] プロパティを選択し、オプションの一覧から [埋め込まれたリソース] を選択します。

  3. [プロジェクト] メニューの [BackStageCOMAddin のプロパティ] をクリックします。

  4. [リソース] タブをクリックします。

  5. ソリューション エクスプローラーから customUI14.xml を [リソース] デザイン サーフェイスにドラッグします。

    これにより、XML コンテンツを含む新しいファイル ベースのリソースが作成されます。これ以降、customUI.xml ファイルは自動的にアプリケーション リソースとして格納され、その内容を Visual Basic 言語または Visual C# 言語の機能を使用して取得できます。

  6. [リソース] ウィンドウを閉じます。プロンプトが表示されたら、[はい] をクリックしてリソース ダイアログを保存します。

ホスト アプリケーションにアクセスして Backstage ビューを操作するには

  1. ソリューション エクスプローラーで、Connect.cs または Connect.vb を右クリックし、[コードの表示] をクリックします。

  2. applicationObject 変数の既存の宣言を検索し、Word.Application オブジェクトを参照するように変更します。つまり、次の例のように宣言を変更します。

    Private applicationObject As Word.Application
    
    private Word.Application applicationObject;
    
  3. OnConnection メソッドの既存の行を変更します。このメソッドは、Word.Application オブジェクトのインスタンスを作成します。

    applicationObject = DirectCast(application, Word.Application)
    
    applicationObject =(Word.Application)application;
    
  4. (Visual Basic のみ) クラスの先頭近くにある Implements で始まるコード行を、次の例のように変更して、IRibbonExtensibility 名前空間の実装のサポートを追加し、Enter キーを押します。Visual Basic により、GetCustomUI プロシージャが自動的に挿入されます。

    Implements Extensibility.IDTExtensibility2, IRibbonExtensibility
    
  5. (C# のみ) 次の例に示すように、public class Connect : ステートメントの最後に、カンマを追加し、さらにインターフェイス名を入力します。

    IRibbonExtensibility
    
  6. (C# のみ) 追加したインターフェイスを右クリックし、[インターフェイスの実装] をクリックして、[インターフェイスを明示的に実装] をクリックします。これにより、IRibbonExtensibility インターフェイスのメンバー GetCustomUI に対してのみスタブ プロシージャが追加されます。

  7. 次の例のように GetCustomUI メソッドを変更します。

    Public Function GetCustomUI(ByVal RibbonID As String) As String Implements Microsoft.Office.Core.IRibbonExtensibility.GetCustomUI
       Return OutSpaceCOMAddin.My.Resources.customUI14
    End Function
    
    string IRibbonExtensibility.GetCustomUI(string RibbonID)
    {
      return SpecStatusResource.customUI14;
    }
    

    重要

    GetCustomUI はユーザー インターフェイスのカスタマイズに対する XML 文字列を返すために実装されるものであり、初期化には使用できません。特に、GetCustomUI の実装でダイアログ ボックスやメッセージ ウィンドウを表示しないでください。初期化にさらに適した場所は、OnConnection メソッド (共有アドインの場合) または ThisAddIn_Startup メソッド (Microsoft Visual Studio 2005 Tools for Office Second Edition を使用して作成されたアドインの場合) の中です。

  8. 次のメソッドをクラスに追加します。このメソッドはリボン UI が読み込まれると呼び出され、リボン UI を参照する変数を作成して、リボンを再描画します。

    Private myRibbon As Office.IRibbonUI
    Sub OnLoad(ByVal ribbon As Office.IRibbonUI)
       myRibbon = ribbon
       myRibbon.Invalidate()
    End Sub
    
    IRibbonUI myRibbon;
    public void OnLoad(IRibbonUI ribbon)
    {
       myRibbon = ribbon;
       myRibbon.Invalidate();
    }
    

よく寄せられる質問

Backstage ビューに関してよく寄せられる質問を以下に示します。

  • Backstage ビューには最大で何個のカスタムを追加できますか。
    タブの数の上限は 255 です。

  • タブを追加する場所を指定できますか。
    既存のタブの前または後にカスタム タブを表示するよう指定できます。

  • 既存のタブの順序を変更できますか。
    既存のタブの順序は変更できません。別のタブの前または後にタブを挿入して、タブの相対順序を指定することだけができます。

  • 既存のタブの列のレイアウトは変更できますか。
    自分で作成したものではない既存のタブの列レイアウトは変更できません。

  • グループはどこに追加できますか。
    新しいグループは、既存のタブの任意の列に追加できます。また、新しいグループを既存グループの前または後に表示するかどうかも指定できます。ただし、[共有] タブのように taskFormGroup を含むタブにさらにグループを追加することはできません。

  • 既存のグループの順序を変更できますか。
    既存グループの順序は変更できません。作成する新しいグループの相対的な順序のみを指定できます。

  • Backstage を変更する複数の COM アドインを Microsoft Office アプリケーションに追加するとき、実装される順序はどのようにすればわかりますか。
    競合する変更の間の優先順序は、最後のものが最優先されます。

Backstage ビューのコントロールの説明、属性、および子情報

以下の XML リファレンスには、Backstage ビューの一部として含まれるコントロールについての詳細が記載されています。

Backstage

<backstage> 要素を表します。

属性

種類

コールバック シグネチャ

onShow

コールバック

VBA: Sub OnShow(contextObject As Object)

C#: void OnShow(object contextObject)

Visual Basic: Sub OnShow(contextObject As Object)

C++: HRESULT OnShow([in] Object *pContextObject)

onHide

コールバック

VBA: Sub OnHide(contextObject As Object)

C#: void OnHide(object contextObject)

Visual Basic: Sub OnHide(contextObject As Object)

C++: HRESULT OnHide([in] Object *pContextObject)

子 : tab、button

ボタン

button コントロールを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

*expand

文字列

該当なし

*layout

文字列

該当なし

tag

文字列

該当なし

*insertAfterMso

組み込みの名前 (文字列)

該当なし

*insertBeforeMso

組み込みの名前 (文字列)

該当なし

*insertAfterQ

修飾名 (文字列)

該当なし

*insertBeforeQ

修飾名 (文字列)

該当なし

*description

文字列

該当なし

*getDescription

コールバック

VBA: Sub GetDescription(control As IRibbonControl, ByRef returnedVal)

C#: string GetDescription(IRibbonControl control)

Visual Basic: Function GetDescription(control As IRibbonControl) As String

C++: HRESULT GetDescription([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

enabled

ブール型

該当なし

getEnabled

コールバック

VBA: Sub GetEnabled(control As IRibbonControl, ByRef returnedVal)

C#: bool GetEnabled(IRibbonControl control)

Visual Basic: Function GetEnabled(control As IRibbonControl) as Boolean

C++: HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

keytip

トークン

該当なし

getKeytip

コールバック

VBA: Sub GetKeytip(control As IRibbonControl, ByRef returnedVal)

C#: string GetKeytip(IRibbonControl control)

Visual Basic: Function GetKeytip(control As IRibbonControl) As String

C++: HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

*screentip

文字列

該当なし

*getScreentip

コールバック

VBA: Sub GetScreentip(control As IRibbonControl, ByRef returnedVal)

C#: string GetScreentip(IRibbonControl control)

Visual Basic: Function GetScreentip(control As IRibbonControl) As String

C++: HRESULT GetScreentip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

*supertip

文字列

該当なし

*getSupertip

コールバック

VBA: Sub GetSupertip(control As IRibbonControl, ByRef returnedVal)

C#: string GetSupertip(IRibbonControl control)

Visual Basic: Function GetSupertip(control As IRibbonControl) As String

C++: HRESULT GetSupertip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

onAction

コールバック

VBA: Sub OnAction(control As IRibbonControl)

C#: void OnAction(IRibbonControl control)

Visual Basic: Sub OnAction(control As IRibbonControl)

C++: HRESULT OnAction([in] IRibbonControl *pControl)

isDefinitive

ブール型

該当なし

image

文字列

該当なし

imageMso

組み込みの名前 (文字列)

該当なし

getImage

コールバック

VBA: Sub GetImage(control As IRibbonControl, ByRef returnedBitmap)

C#: Bitmap GetImage(IRibbonControl control)

Visual Basic: Function GetImage(control As IRibbonControl) As Bitmap

C++: HRESULT GetImage([in] IRibbonControl *pControl, [out, retval] IPictureDisp ** ppdispImage)

* すべての実装で使用されるわけではありません

子 : なし

カテゴリ

category コンテナーを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

子 : task

チェック ボックス

checkBox コントロールを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

*expand

文字列

該当なし

*layout

文字列

該当なし

enabled

ブール型

該当なし

getEnabled

コールバック

VBA: Sub GetEnabled(control As IRibbonControl, ByRef returnedVal)

C#: bool GetEnabled(IRibbonControl control)

Visual Basic: Function GetEnabled(control As IRibbonControl) as Boolean

C++: HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

keytip

トークン

該当なし

getKeytip

コールバック

VBA: Sub GetKeytip(control As IRibbonControl, ByRef returnedVal)

C#: string GetKeytip(IRibbonControl control)

Visual Basic: Function GetKeytip(control As IRibbonControl) As String

C++: HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

onAction

コールバック

VBA: Sub OnAction(control As IRibbonControl, isPressed As Boolean)

C#: void OnAction(IRibbonControl control, bool isPressed)

Visual Basic: Sub OnAction(control As IRibbonControl, isPressed As Boolean)

C++: HRESULT OnAction([in] IRibbonControl *pControl, [in] BSTR VARIANT_BOOL *pvarPressed)

getPressed

コールバック

VBA: Sub GetPressed(control As IRibbonControl, ByRef returnedVal)

C#: bool GetPressed(IRibbonControl control)

Visual Basic: Function GetPressed(control As IRibbonControl) As Boolean

C++: HRESULT GetPressed([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

description

文字列

該当なし

getDescription

コールバック

VBA: Sub GetDescription(control As IRibbonControl, ByRef returnedVal)

C#: string GetDescription(IRibbonControl control)

Visual Basic: Function GetDescription(control As IRibbonControl) As String

C++: HRESULT GetDescription([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

*screentip

文字列

該当なし

*getScreentip

コールバック

VBA: Sub GetScreentip(control As IRibbonControl, ByRef returnedVal)

C#: string GetScreentip(IRibbonControl control)

Visual Basic: Function GetScreentip(control As IRibbonControl) As String

C++: HRESULT GetScreentip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

*supertip

文字列

該当なし

*getSupertip

コールバック

VBA: Sub GetSupertip(control As IRibbonControl, ByRef returnedVal)

C#: string GetSupertip(IRibbonControl control)

Visual Basic: Function GetSupertip(control As IRibbonControl) As String

C++: HRESULT GetSupertip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

* すべての実装で使用されるわけではありません

子 : なし

コンボ ボックス

comboBox コントロールを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

alignLabel

文字列

該当なし

expand

文字列

該当なし

layout

文字列

該当なし

enabled

ブール型

該当なし

getEnabled

コールバック

VBA: Sub GetEnabled(control As IRibbonControl, ByRef returnedVal)

C#: bool GetEnabled(IRibbonControl control)

Visual Basic: Function GetEnabled(control As IRibbonControl) as Boolean

C++: HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

getItemCount

コールバック

VBA: Sub GetItemCount(control As IRibbonControl, ByRef returnedVal)

C#: int GetItemCount(IRibbonControl control)

Visual Basic: Function GetItemCount(control As IRibbonControl) as Integer

C++: HRESULT GetItemCount([in] IRibbonControl *pControl, [out, retval] LONG *returnedVal)

getItemID

コールバック

VBA: Sub GetItemID(control As IRibbonControl, itemIndex as Integer, ByRef returnedVal)

C#: string GetItemID(IRibbonControl control, int itemIndex)

Visual Basic: Function GetItemID(control As IRibbonControl, itemIndex as Integer) as String

C++: HRESULT GetItemID([in] IRibbonControl *pControl, [in] LONG cIndex, [out, retval] BSTR *pbstrReturnedVal)

getItemLabel

コールバック

VBA: Sub GetItemLabel(control As IRibbonControl, itemIndex as Integer, ByRef returnedVal)

C#: string GetItemLabel(IRibbonControl control, int itemIndex)

Visual Basic: Function GetItemLabel(control As IRibbonControl, itemIndex as Integer) as String

C++: HRESULT GetItemLabel([in] IRibbonControl *pControl, [in] LONG cIndex, [out, retval] BSTR *pbstrReturnedVal)

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

onChange

コールバック

VBA: Sub OnChange(control As IRibbonControl, text As String)

C#: void OnChange(IRibbonControl control, string text)

Visual Basic: Sub OnChange(control As IRibbonControl, text As String)

C++: HRESULT OnChange([in] IRibbonControl *pControl, [in] BSTR *pbstrText)

keytip

トークン

該当なし

getKeytip

コールバック

VBA: Sub GetKeytip(control As IRibbonControl, ByRef returnedVal)

C#: string GetKeytip(IRibbonControl control)

Visual Basic: Function GetKeytip(control As IRibbonControl) As String

C++: HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

sizeString

文字列

該当なし

getText

コールバック

VBA: Sub GetText(control As IRibbonControl, ByRef returnedVal)

C#: string GetText(IRibbonControl control)

Visual Basic: Function GetText(control As IRibbonControl) As String

C++: HRESULT GetText([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

子 : item

customUI

すべての Fluent UI カスタマイズのルート タグです。

属性

種類

コールバック シグネチャ

onLoad

コールバック

VBA: Sub OnLoad(ribbon As IRibbonUI)

C#: void OnLoad(IRibbonUI ribbon)

Visual Basic: Sub OnLoad(ribbon As IRibbonUI)

C++: HRESULT OnLoad([in] IRibbonUI *pRibbon)

loadImage

コールバック

VBA: Sub LoadImage(imageId As String, ByRef image)

C#: IPictureDisp LoadImage(string image_id)

Visual Basic: Function LoadImage(imageId As String) As IPictureDisp

C++: HRESULT LoadImage([in] BSTR *pbstrImageId, [out, retval] IPictureDisp ** ppdispImage) *pRibbon)

子 : commands、ribbon、backstage

ドロップ ダウン

dropDown コントロールを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

expand

文字列

該当なし

layout

文字列

該当なし

enabled

ブール型

該当なし

getEnabled

コールバック

VBA: Sub GetEnabled(control As IRibbonControl, ByRef returnedVal)

C#: bool GetEnabled(IRibbonControl control)

Visual Basic: Function GetEnabled(control As IRibbonControl) as Boolean

C++: HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

getItemCount

コールバック

VBA: Sub GetItemCount(control As IRibbonControl, ByRef returnedVal)

C#: int GetItemCount(IRibbonControl control)

Visual Basic: Function GetItemCount(control As IRibbonControl) as Integer

C++: HRESULT GetItemCount([in] IRibbonControl *pControl, [out, retval] LONG *returnedVal)

getItemID

コールバック

VBA: Sub GetItemID(control As IRibbonControl, itemIndex as Integer, ByRef returnedVal)

C#: string GetItemID(IRibbonControl control, int itemIndex)

Visual Basic: Function GetItemID(control As IRibbonControl, itemIndex as Integer) as String

C++: HRESULT GetItemID([in] IRibbonControl *pControl, [in] LONG cIndex, [out, retval] BSTR *pbstrReturnedVal)

getItemLabel

コールバック

VBA: Sub GetItemLabel(control As IRibbonControl, itemIndex as Integer, ByRef returnedVal)

C#: string GetItemLabel(IRibbonControl control, int itemIndex)

Visual Basic: Function GetItemLabel(control As IRibbonControl, itemIndex as Integer) as String

C++: HRESULT GetItemLabel([in] IRibbonControl *pControl, [in] LONG cIndex, [out, retval] BSTR *pbstrReturnedVal)

getSelectedItemIndex

コールバック

VBA: Sub GetSelectedItemIndex(control As IRibbonControl, ByRef returnedVal)

C#: int GetSelectedItemIndex(IRibbonControl control)

Visual Basic: Function GetSelectedItemIndex(control As IRibbonControl) as Integer

C++: HRESULT GetSelectedItemIndex([in] IRibbonControl *pControl, [out, retval] LONG *returnedVal)

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

onAction

コールバック

VBA: Sub OnAction(control As IRibbonControl, itemID As String, itemIndex As Integer)

C#: void OnAction(IRibbonControl control, string itemID, int itemIndex)

Visual Basic: Sub OnAction(control As IRibbonControl, itemID As String, itemIndex As Integer)

C++: HRESULT OnAction([in] IRibbonControl *pControl, [in] BSTR *selectedID, [in] LONG cSelectedIndex)

keytip

トークン

該当なし

getKeytip

コールバック

VBA: Sub GetKeytip(control As IRibbonControl, ByRef returnedVal)

C#: string GetKeytip(IRibbonControl control)

Visual Basic: Function GetKeytip(control As IRibbonControl) As String

C++: HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

sizeString

文字列

該当なし

screentip

文字列

該当なし

getScreentip

コールバック

VBA: Sub GetScreentip(control As IRibbonControl, ByRef returnedVal)

C#: string GetScreentip(IRibbonControl control)

Visual Basic: Function GetScreentip(control As IRibbonControl) As String

C++: HRESULT GetScreentip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

supertip

文字列

該当なし

getSupertip

コールバック

VBA: Sub GetSupertip(control As IRibbonControl, ByRef returnedVal)

C#: string GetSupertip(IRibbonControl control)

Visual Basic: Function GetSupertip(control As IRibbonControl) As String

C++: HRESULT GetSupertip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

子 : item

編集ボックス

editBox コントロールを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

alignLabel

文字列

該当なし

enabled

ブール型

該当なし

getEnabled

コールバック

VBA: Sub GetEnabled(control As IRibbonControl, ByRef returnedVal)

C#: bool GetEnabled(IRibbonControl control)

Visual Basic: Function GetEnabled(control As IRibbonControl) as Boolean

C++: HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

expand

文字列

該当なし

layout

文字列

該当なし

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

keytip

トークン

該当なし

getKeytip

コールバック

VBA: Sub GetKeytip(control As IRibbonControl, ByRef returnedVal)

C#: string GetKeytip(IRibbonControl control)

Visual Basic: Function GetKeytip(control As IRibbonControl) As String

C++: HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

maxLength

正の整数

該当なし

onChange

コールバック

VBA: Sub OnChange(control As IRibbonControl, text As String)

C#: void OnChange(IRibbonControl control, string text)

Visual Basic: Sub OnChange(control As IRibbonControl, text As String)

C++: HRESULT OnChange([in] IRibbonControl *pControl, [in] BSTR *pbstrText)

sizeString

文字列

該当なし

getText

コールバック

VBA: Sub GetText(control As IRibbonControl, ByRef returnedVal)

C#: string GetText(IRibbonControl control)

Visual Basic: Function GetText(control As IRibbonControl) As String

C++: HRESULT GetText([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

子 : なし

グループ

group コンテナーを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

insertAfterMso

組み込みの名前 (文字列)

該当なし

insertBeforeMso

組み込みの名前 (文字列)

該当なし

insertAfterQ

修飾名 (文字列)

該当なし

insertBeforeQ

修飾名 (文字列)

該当なし

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

getStyle

コールバック

VBA: Sub GetStyle(control As IRibbonControl, ByRef returnedVal)

C#: BackstageGroupStyle GetStyle(IRibbonControl control)

Visual Basic: Function GetStyle(control As IRibbonControl) As BackstageGroupStyle

C++: HRESULT GetStyle([in] IRibbonControl *pControl, [out, retval] BackstageGroupStyle *pbstrReturnedVal)

helperText

文字列

該当なし

getHelperText

VBA: Sub GetHelperText(control As IRibbonControl, ByRef returnedVal)

C#: string GetHelperText(IRibbonControl control)

Visual Basic: Function GetHelperText(control As IRibbonControl) As String

C++: HRESULT GetHelperText([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

showLabel

ブール型

該当なし

getShowLabel

コールバック

VBA: Sub GetShowLabel(control As IRibbonControl, ByRef returnedVal)

C#: bool GetShowLabel(IRibbonControl control)

Visual Basic: Function GetShowLabel(control As IRibbonControl) As Boolean

C++: HRESULT GetShowLabel([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

子 : primaryItem、topItems、bottomItems

グループ ボックス

groupBox コンテナーを表します。

属性 :

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

expand

文字列

該当なし

layout

文字列

該当なし

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

子 : button, checkbox, editBox, dropdown, radioGroup, comboBox, hyperlink, labelControl, groupBox, layoutContainer, imageControl

ハイパーリンク

hyperlink コントロールを表します。

属性 :

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

alignLabel

文字列

該当なし

expand

文字列

該当なし

enabled

ブール型

該当なし

getEnabled

コールバック

VBA: Sub GetEnabled(control As IRibbonControl, ByRef returnedVal)

C#: bool GetEnabled(IRibbonControl control)

Visual Basic: Function GetEnabled(control As IRibbonControl) as Boolean

C++: HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

keytip

トークン

該当なし

getKeytip

コールバック

VBA: Sub GetKeytip(control As IRibbonControl, ByRef returnedVal)

C#: string GetKeytip(IRibbonControl control)

Visual Basic: Function GetKeytip(control As IRibbonControl) As String

C++: HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

layout

文字列

該当なし

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

target

文字列

該当なし

getTarget

コールバック

VBA: Sub GetTarget(control As IRibbonControl, ByRef returnedVal)

C#: string GetTarget(IRibbonControl control)

Visual Basic: Function GetTarget(control As IRibbonControl) As String

C++: HRESULT GetTarget([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

子 : なし

イメージ コントロール

imageControl コントロールを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

enabled

ブール型

該当なし

getEnabled

コールバック

VBA: Sub GetEnabled(control As IRibbonControl, ByRef returnedVal)

C#: bool GetEnabled(IRibbonControl control)

Visual Basic: Function GetEnabled(control As IRibbonControl) as Boolean

C++: HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

image

文字列

該当なし

imageMso

組み込みの名前 (文字列)

該当なし

getImage

コールバック

VBA: Sub GetImage(control As IRibbonControl, ByRef returnedBitmap)

C#: Bitmap GetImage(IRibbonControl control)

Visual Basic: Function GetImage(control As IRibbonControl) As Bitmap

C++: HRESULT GetImage([in] IRibbonControl *pControl, [out, retval] IPictureDisp ** ppdispImage)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

子 : なし

アイテム

dropDown または comboBox コントロール内のアイテムを洗わします。

属性

種類

コールバック シグネチャ

id

id

該当なし

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

子 : なし

ラベル コントロール

labelControl コントロールを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

alignLabel

文字列

該当なし

expand

文字列

該当なし

enabled

ブール型

該当なし

getEnabled

コールバック

VBA: Sub GetEnabled(control As IRibbonControl, ByRef returnedVal)

C#: bool GetEnabled(IRibbonControl control)

Visual Basic: Function GetEnabled(control As IRibbonControl) as Boolean

C++: HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

layout

文字列

該当なし

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

子 : なし

レイアウト コンテナー

layoutContainer コンテナーを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

align

文字列

該当なし

expand

文字列

該当なし

layoutChildren

文字列

該当なし

子 : button, checkbox, editBox, dropdown, radioGroup, comboBox, hyperlink, labelControl, groupBox, layoutContainer, imageControl

メニュー

menu コントロールを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

*description

文字列

該当なし

*getDescription

コールバック

VBA: Sub GetDescription(control As IRibbonControl, ByRef returnedVal)

C#: string GetDescription(IRibbonControl control)

Visual Basic: Function GetDescription(control As IRibbonControl) As String

C++: HRESULT GetDescription([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

tag

文字列

該当なし

enabled

ブール型

該当なし

getEnabled

コールバック

VBA: Sub GetEnabled(control As IRibbonControl, ByRef returnedVal)

C#: bool GetEnabled(IRibbonControl control)

Visual Basic: Function GetEnabled(control As IRibbonControl) as Boolean

C++: HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

image

文字列

該当なし

imageMso

組み込みの名前 (文字列)

該当なし

getImage

コールバック

VBA: Sub GetImage(control As IRibbonControl, ByRef returnedBitmap)

C#: Bitmap GetImage(IRibbonControl control)

Visual Basic: Function GetImage(control As IRibbonControl) As Bitmap

C++: HRESULT GetImage([in] IRibbonControl *pControl, [out, retval] IPictureDisp ** ppdispImage)

keytip

トークン

該当なし

getKeytip

コールバック

VBA: Sub GetKeytip(control As IRibbonControl, ByRef returnedVal)

C#: string GetKeytip(IRibbonControl control)

Visual Basic: Function GetKeytip(control As IRibbonControl) As String

C++: HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

*screentip

文字列

該当なし

*getScreentip

コールバック

VBA: Sub GetScreentip(control As IRibbonControl, ByRef returnedVal)

C#: string GetScreentip(IRibbonControl control)

Visual Basic: Function GetScreentip(control As IRibbonControl) As String

C++: HRESULT GetScreentip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

*supertip

文字列

該当なし

*getSupertip

コールバック

VBA: Sub GetSupertip(control As IRibbonControl, ByRef returnedVal)

C#: string GetSupertip(IRibbonControl control)

Visual Basic: Function GetSupertip(control As IRibbonControl) As String

C++: HRESULT GetSupertip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

* すべての実装で使用されるわけではありません

子 : menuGroup

メニュー グループ

menuGroup コンテナーを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

itemSize

文字列

該当なし

子 : button、checkbox、menu

プライマリ アイテム

primaryItem コンテナーを表します。

属性 : なし

子 : button、menu

ラジオ ボタン

radioGroup コントロール内のボタンを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

子 : なし

ラジオ グループ

radioButton コントロールのコンテナーを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

alignLabel

文字列

該当なし

expand

文字列

該当なし

layout

文字列

該当なし

enabled

ブール型

該当なし

getEnabled

コールバック

VBA: Sub GetEnabled(control As IRibbonControl, ByRef returnedVal)

C#: bool GetEnabled(IRibbonControl control)

Visual Basic: Function GetEnabled(control As IRibbonControl) as Boolean

C++: HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

getItemCount

コールバック

VBA: Sub GetItemCount(control As IRibbonControl, ByRef returnedVal)

C#: int GetItemCount(IRibbonControl control)

Visual Basic: Function GetItemCount(control As IRibbonControl) as Integer

C++: HRESULT GetItemCount([in] IRibbonControl *pControl, [out, retval] LONG *returnedVal)

getItemID

コールバック

VBA: Sub GetItemID(control As IRibbonControl, itemIndex as Integer, ByRef returnedVal)

C#: string GetItemID(IRibbonControl control, int itemIndex)

Visual Basic: Function GetItemID(control As IRibbonControl, itemIndex as Integer) as String

C++: HRESULT GetItemID([in] IRibbonControl *pControl, [in] LONG cIndex, [out, retval] BSTR *pbstrReturnedVal)

getItemLabel

コールバック

VBA: Sub GetItemLabel(control As IRibbonControl, itemIndex as Integer, ByRef returnedVal)

C#: string GetItemLabel(IRibbonControl control, int itemIndex)

Visual Basic: Function GetSelectedItemIndex(control As IRibbonControl, itemIndex as Integer) as String

C++: HRESULT GetSelectedItemIndex([in] IRibbonControl *pControl, [in] LONG cIndex, [out, retval] BSTR *pbstrReturnedVal)

getSelectedItemIndex

コールバック

VBA: Sub GetSelectedItemIndex(control As IRibbonControl, ByRef returnedVal)

C#: int GetSelectedItemIndex(IRibbonControl control)

Visual Basic: Function GetSelectedItemIndex(control As IRibbonControl) as Integer

C++: HRESULT GetSelectedItemIndex([in] IRibbonControl *pControl, [out, retval] LONG *returnedVal)

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

onAction

コールバック

VBA: Sub OnAction(control As IRibbonControl)

C#: void OnAction(IRibbonControl control)

Visual Basic: Sub OnAction(control As IRibbonControl)

C++: HRESULT OnAction([in] IRibbonControl *pControl)

keytip

トークン

該当なし

getKeytip

コールバック

VBA: Sub GetKeytip(control As IRibbonControl, ByRef returnedVal)

C#: string GetKeytip(IRibbonControl control)

Visual Basic: Function GetKeytip(control As IRibbonControl) As String

C++: HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

子 : radioButton

タブ

関連する Backstage ビュー コントロールのプライマリ コンテナーを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

insertAfterMso

組み込みの名前 (文字列)

該当なし

insertBeforeMso

組み込みの名前 (文字列)

該当なし

insertAfterQ

修飾名 (文字列)

該当なし

insertBeforeQ

修飾名 (文字列)

該当なし

enabled

ブール型

該当なし

getEnabled

コールバック

VBA: Sub GetEnabled(control As IRibbonControl, ByRef returnedVal)

C#: bool GetEnabled(IRibbonControl control)

Visual Basic: Function GetEnabled(control As IRibbonControl) as Boolean

C++: HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

keytip

トークン

該当なし

getKeytip

コールバック

VBA: Sub GetKeytip(control As IRibbonControl, ByRef returnedVal)

C#: string GetKeytip(IRibbonControl control)

Visual Basic: Function GetKeytip(control As IRibbonControl) As String

C++: HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

title

文字列

該当なし

getTitle

コールバック

VBA: Sub GetTitle(control As IRibbonControl, ByRef returnedVal)

C#: string GetTitle(IRibbonControl control)

Visual Basic: Function GetTitle(control As IRibbonControl) As String

C++: HRESULT GetTitle([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

columnWidthPercent

正の整数

該当なし

firstColumnMinWidth

正の整数

該当なし

firstColumnMaxWidth

正の整数

該当なし

secondColumnMinWidth

正の整数

該当なし

secondColumnMaxWidth

正の整数

該当なし

子 : firstColumn、secondColumn

タスク

task コンテナーを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

enabled

ブール型

該当なし

getEnabled

コールバック

VBA: Sub GetEnabled(control As IRibbonControl, ByRef returnedVal)

C#: bool GetEnabled(IRibbonControl control)

Visual Basic: Function GetEnabled(control As IRibbonControl) as Boolean

C++: HRESULT GetEnabled([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

keytip

トークン

該当なし

getKeytip

コールバック

VBA: Sub GetKeytip(control As IRibbonControl, ByRef returnedVal)

C#: string GetKeytip(IRibbonControl control)

Visual Basic: Function GetKeytip(control As IRibbonControl) As String

C++: HRESULT GetKeytip([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

description

文字列

該当なし

getDescription

コールバック

VBA: Sub GetDescription(control As IRibbonControl, ByRef returnedVal)

C#: string GetDescription(IRibbonControl control)

Visual Basic: Function GetDescription(control As IRibbonControl) As String

C++: HRESULT GetDescription([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

image

文字列

該当なし

imageMso

組み込みの名前 (文字列)

該当なし

getImage

コールバック

VBA: Sub GetImage(control As IRibbonControl, ByRef returnedBitmap)

C#: Bitmap GetImage(IRibbonControl control)

Visual Basic: Function GetImage(IRibbonControl control) As Bitmap

C++: HRESULT GetImage([in] IRibbonControl *pControl, [out, retval] IPictureDisp ** ppdispImage)

子 : group

タスク フォーム グループ

taskFormGroup コンテナーを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

insertAfterMso

組み込みの名前 (文字列)

該当なし

insertBeforeMso

組み込みの名前 (文字列)

該当なし

insertAfterQ

修飾名 (文字列)

該当なし

insertBeforeQ

修飾名 (文字列)

該当なし

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

helperText

文字列

該当なし

getHelperText

コールバック

VBA: Sub GetHelperText(control As IRibbonControl, ByRef returnedVal)

C#: string GetHelperText(IRibbonControl control)

Visual Basic: Function GetHelperText(control As IRibbonControl) As String

C++: HRESULT GetHelperText([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

showLabel

ブール型

該当なし

getShowLabel

コールバック

VBA: Sub GetShowLabel(control As IRibbonControl, ByRef returnedVal)

C#: bool GetShowLabel(IRibbonControl control)

Visual Basic: Function GetShowLabel(control As IRibbonControl) As Boolean

C++: HRESULT GetShowLabel([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

子 : category

タスク グループ

taskGroup コンテナーを表します。

属性

種類

コールバック シグネチャ

id

id

該当なし

idQ

修飾名 (文字列)

該当なし

idMso

組み込みの名前 (文字列)

該当なし

tag

文字列

該当なし

insertAfterMso

組み込みの名前 (文字列)

該当なし

insertBeforeMso

組み込みの名前 (文字列)

該当なし

insertAfterQ

修飾名 (文字列)

該当なし

insertBeforeQ

修飾名 (文字列)

該当なし

label

文字列

該当なし

getLabel

コールバック

VBA: Sub GetLabel(control As IRibbonControl, ByRef returnedVal)

C#: string GetLabel(IRibbonControl control)

Visual Basic: Function GetLabel(control As IRibbonControl) As String

C++: HRESULT GetLabel([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

visible

ブール型

該当なし

getVisible

コールバック

VBA: Sub GetVisible(control As IRibbonControl, ByRef returnedVal)

C#: bool GetVisible(IRibbonControl control)

Visual Basic: Function GetVisible(control As IRibbonControl) As Boolean

C++: HRESULT GetVisible([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

helperText

文字列

該当なし

getHelperText

コールバック

VBA: Sub GetHelperText(control As IRibbonControl, ByRef returnedVal)

C#: string GetHelperText(IRibbonControl control)

Visual Basic: Function GetHelperText(control As IRibbonControl) As String

C++: HRESULT GetHelperText([in] IRibbonControl *pControl, [out, retval] BSTR *pbstrReturnedVal)

showLabel

ブール型

該当なし

getShowLabel

コールバック

VBA: Sub GetShowLabel(control As IRibbonControl, ByRef returnedVal)

C#: bool GetShowLabel(IRibbonControl control)

Visual Basic: Function GetShowLabel(control As IRibbonControl) As Boolean

C++: HRESULT GetShowLabel([in] IRibbonControl *pControl, [out, retval] BSTR VARIANT_BOOL *pvarReturnedVal)

子 : category

まとめ

Backstage ビューの拡張機能を使用すると、カスタマイズして対象を絞ったメニューとオプションのセットをユーザーに提供できます。何よりよいのは、リボン UI をカスタマイズするときと同じ操作性と構造を使用できることです。Microsoft Office Fluent UI を構成するさまざまなコンポーネントを調べて、組織に合わせてカスタマイズしたアプリケーションを作成することをお勧めします。

その他の技術情報

この記事で説明したトピックの詳細については、次の場所を参照してください。

謝辞 : この記事を公開する準備を手伝ってくれた編集者の Linda Cannon に感謝します。