PPT另存为htm 或 mht 等网页格式


一、問題描述

在 PowerPoint 2010 不提供另存新檔為 htm、mht 選項,但假如需要將簡報檔案轉換成 htm 或 mht 等網頁格式,該如何處理?

二、方法

可以透過 VBA 撰寫程式呼叫 PowerPoint object model 將簡報檔匯出成 htm 或 mht 檔案,參考以下步驟 :

1. 使用 PowerPoint 2010 開啟 PowerPoint 檔案。

2. 按 Alt + F11 開啟 VBA。

3. 出現 VBA 後,按 Ctrl + G 呼叫 [即時咚鉣 視窗。

4. 在即時咚阒凶珜懸韵鲁淌酱a,其中您必須將 SaveAs後的的內容修改為另存新檔的檔案路徑與名稱,輸入後按 Enter 鍵執行即可另存新檔為 htm。

1 ActivePresentation.SaveAs "<Drive>:users<username>desktop<filename>.htm", ppSaveAsHTML, msoFalse

例如要儲存到 C: ,檔案名稱為 TEST.htm,則

1 ActivePresentation.SaveAs "C:TEST.htm", ppSaveAsHTML, msoFalse

5. 將簡報檔匯出成 htm 檔案結果

6. 若要儲存為 mht,請在即時咚阋暣爸休斎胍韵鲁淌酱a,其中您必須將 SaveAs後的的內容修改為另存新檔的檔案路徑與名稱

輸入後按 Enter 鍵執行即可另存新檔為 mht。

1 ActivePresentation.SaveAs "<Drive>:users<username>desktop<filename>.htm", ppSaveAsWebArchive, msoFalse

例如要儲存到 C: ,檔案名稱為 TEST.mht,則

1 ActivePresentation.SaveAs "C:TEST.mht", ppSaveAsWebArchive, msoFalse

7. 將簡報檔匯出成 mht 檔案結果。

三、相關參考與連結

The “Save As” dialog box does not have the .htm and the .mht file type option in PowerPoint 2010

PPT另存为htm 或 mht 等网页格式

相关文章:

你感兴趣的文章:

标签云: