メインコンテンツへスキップ

Excelワークシートからビデオファイルを再生する方法は?

ワークシートからビデオファイルを再生しようとしたことがありますか? この記事では、Excelワークブックからコンピューターに保存されているビデオファイルを再生するためのいくつかの興味深いトリックについて説明します。

Windows Media Playerのプロパティを設定して、ワークシートからビデオファイルを再生します

コマンドボタンをクリックして、ワークシートからビデオファイルを再生します


矢印青い右バブル Windows Media Playerのプロパティを設定して、ワークシートからビデオファイルを再生します

Excelには、便利なコントロールがあります- ウィンドウズ メディア プレイ ビデオファイルの再生に役立つ場合は、次のようにしてください。

1に設定します。 OK をクリックします。 Developer > インセット > その他のコントロール、スクリーンショットを参照してください:

doc再生ビデオ1

2。 の中に その他のコントロール ダイアログボックスで、スクロールして選択します Windows Media Playerの オプションをクリックしてから OK ボタンをクリックしてダイアログを閉じ、マウスをドラッグして描画します ウィンドウズ メディア プレイ オブジェクト、スクリーンショットを参照してください:

doc再生ビデオ2

3。 その後、 プロパティ クリックしてダイアログを表示 Developer > プロパティ、で プロパティ ダイアログで、次の操作を行ってください。

(1.) アルファベット順の タブで、からTrueオプションを選択してください 全画面表示 フィールド;

(2.)ファイル拡張子を含むビデオファイルパスをコピーして、に貼り付けます。 URL フィールド。

doc再生ビデオ3

4。 上記の設定が完了したら、終了してください デザインモード、および、指定した動画が再生中です。


矢印青い右バブル コマンドボタンをクリックして、ワークシートからビデオファイルを再生します

コマンドボタンでビデオファイルを再生したい場合は、コマンドボタンをクリックすると、参照ウィンドウがポップアップ表示され、再生するビデオファイルを選択できます。 次の手順が役立ちます。

1。 方法1のステップ2-1に従って、 Windows Media Playerの コントロールをクリックしてから、 Developer > インセット > コマンドボタン コマンドボタンを挿入するには、スクリーンショットを参照してください。

doc再生ビデオ4

2。 次に、コマンドボタンを右クリックして、 プロパティ コンテキストメニューから、ポップアウトで プロパティ ダイアログボックスで、テキストを入力します ビデオの再生 横に キャプション 下のフィールド アルファベット順の タブ、スクリーンショットを参照してください:

doc再生ビデオ5

3。 そして、を閉じます プロパティ ダイアログをクリックし、コマンドボタンをダブルクリックして、次のVBAコードをコピーして貼り付け、元のコードをに置き換えます。 アプリケーション向け Microsoft Visual Basic 窓。

VBAコード:ワークシートからビデオファイルを再生します。

Private Sub CommandButton1_Click()
    Dim FName As Variant
    FName = Application.GetOpenFilename(FileFilter:="Video Files, *.mp4; *.avi; *.mpeg; *.mts", Title:="Please select a Video File", MultiSelect:=False)
    If FName <> False Then
        WindowsMediaPlayer1.Url = FName
    End If
End Sub

doc再生ビデオ6

Note:上記のコードでは、 コマンドボタン1 挿入したコマンドボタン名であり、 WindowsMediaPlayer1 挿入したWindowsMediaPlayerの名前です。 また、必要に応じて他のビデオファイル拡張子をに追加できます * .mp4; * .avi; * .mpeg; * .mts スクリプト。

4。 次に、コードウィンドウを保存して閉じ、終了します。 デザインモード、これで、コマンドボタンをクリックすると、再生するビデオファイルを選択するように通知する参照ウィンドウが表示され、クリックします。 Open ボタンをクリックすると、特定のビデオファイルが一度に再生されます。 スクリーンショットを参照してください:

doc再生ビデオ7


関連記事:

youtobeビデオをExcelワークシートに挿入または埋め込む方法は?

最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!
Comments (6)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I have a file of  a number of URLs to music videos.  I'm not sure of the file extensions, because I see only the URLs.  When one video is finished, I want it to go automatically to the next music video, within the range of videos specified. I don't want to have to get up and click the next URL.  I'm not sure how the vba macro could tell the video is finished.  Is there a property that I can read with a function? A do loop should work fine for going through the list of URLs (hyperlinks), but just need to detect when a video is finished.  Can you help?
This comment was minimized by the moderator on the site
This worked for me but what I want to add is the ability to pause the player and also to have a timer event that checks to see if the player has finished so that I can then load the next track, don't really want to do this with playlists as I prefer to keep control of what is playing in my vba. Long story as to why which I can elaborate on if needed but really if you can give a hint as to how to pause and check playing status that will do,Thanks
This comment was minimized by the moderator on the site
This isn't working for me, what do I put in for WindowsMediaPlayer1?? I get that location as my error, I'm not sure what thats supposed to be. I had it have the same name as my file and it didn't bug but it also didn't play a video
This comment was minimized by the moderator on the site
Merci pour les explications.

J'aime bien l'idée de lancer une vidéo en utilisant un bouton dans Excel. Est-ce qu'il est possible, avec un seul bouton, de lancer deux vidéos différentes dépendamment d'une règle de si. Exemple: Il y a une case dans Excel où on doit écrire un mot donné. Lorsqu'on clic sur le bouton, si le mot est exacte, Vidéo1 se lance. Si le mot est inexacte, vidéo 2 se lance?
This comment was minimized by the moderator on the site
Where do we search???
This comment was minimized by the moderator on the site
Hi, Calbat,
Could you explain your problem more detailed?
Thank you!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations