0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

パワポVBAワンライナー集

0
Last updated at Posted at 2026-03-04

徐々に追加する。

L版横置き用紙設定

ActivePresentation.PageSetup.SlideSize = ppSlideSizeCustom: ActivePresentation.PageSetup.SlideWidth = 12.7# * 28.3464567: ActivePresentation.PageSetup.SlideHeight = 8.9# * 28.3464567

L版縦置き用紙設定

ActivePresentation.PageSetup.SlideSize = ppSlideSizeCustom: ActivePresentation.PageSetup.SlideWidth = 8.9# * 28.3464567: ActivePresentation.PageSetup.SlideHeight = 12.7# * 28.3464567

jpegで出力

ActivePresentation.Slides(ActiveWindow.Selection.SlideRange.SlideIndex).Export Environ$("USERPROFILE") & "\Downloads\out.jpg", "JPG", 3000, CLng(3000 * ActivePresentation.PageSetup.SlideHeight / ActivePresentation.PageSetup.SlideWidth)

幅3000pxで縦は比率を維持した形でjpegをダウンロードフォルダに出力

実行方法

  • パワポが起動している状態で
  • ALT + F11 でVBE起動
  • CTL + G でイミディエイトペインを開き
  • 上記ワンライナーをペーストしてエンター

ワンライナー集を作った背景

  • PowerPointについてるCopilotで「L版の用紙設定して」と命令しても操作方法を言葉で説明するだけで使い物にならない(2026-03-04 現在)
  • パワポを本気で自動操作できるのはVBA
  • だがマクロつきドキュメントの配布の制約はますばかり
  • だったらワンライナーで配布するのが到達しやすい
  • テキストのコピペはだれにも止められない
0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?