如何在PowerPoint中设置默认的保存格式? [英] How do I set the default save format in PowerPoint?

查看:299
本文介绍了如何在PowerPoint中设置默认的保存格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Microsoft以其无限的智慧决定Office 2010应用程序的默认文件格式应为发行时使用13年(Office 97-2002)的格式.

Microsoft, in their infinite wisdom, decided that the default file format for Office 2010 applications should be the format that was 13 years old (Office 97-2002) at the time of release.

更新的格式(2007年和更新的格式)将数据保存在压缩的XML文件中,该文件要小得多,并且还允许许多其他功能.我们公司的IT部门尚未设置或无法设置组策略来强制用户默认以新格式保存,因此我正在编写一个宏来为我们部门中的每个人调整设置.

The newer formats (2007 and newer) save the data in compressed XML files which are much smaller, and also allow for many additional features. Our corporate IT department hasn't or can't set a group policy to force users to default to saving in the new format, so I'm writing a macro to adjust the settings for everyone in our department.

我可以通过执行以下VBA代码(在Excel工作簿中运行它)来非常简单地在Excel和Word中执行此操作:

I can do this in Excel and Word very simply by executing the following VBA code (I'm running it from an Excel workbook):

Public Sub SetExcelSave()

  Dim myExcel As Excel.Application

  Set myExcel = New Excel.Application
  Excel.DefaultSaveFormat = xlOpenXMLWorkbook
  Excel.Quit

  Set Excel = Nothing

End Sub

Public Sub SetWordSave()

  Dim myWord As Word.Application
  Set myWord = New Word.Application

  Word.DefaultSaveFormat = wdFormatDocumentDefault
  Word.Quit

  Set Word = Nothing

End Sub

但是,我无法在PowerPoint中找到合适的设置进行调整.有人知道该属性在哪里或被称为什么?

However, I haven't been able to find the appropriate setting to adjust in PowerPoint. Does anyone know where that property is or what it's called?

该代码将不能干净地编译,从而在PPT.DefaultSaveFormat行上给出错误:

This code will not compile cleanly, giving an error on the PPT.DefaultSaveFormat line:

Public Sub SetPowerPointSave()

  Dim PPT As PowerPoint.Application
  Set PPT = New PowerPoint.Application

  PPT.DefaultSaveFormat = ppSaveAsOpenXMLPresentation
  PPT.Quit

  Set PPT = Nothing

End Sub

我在 Office Application Object文档中翻阅了 for PowerPoint,但我只是找不到我想要的.我很有可能只是不知道我在寻找什么,而只是忽略了它.

I've rummaged around in the Office Application Object documentation for PowerPoint, but I'm just not finding what I'm after. It's highly likely that I just don't know what I'm looking for and have simply overlooked it.

有人知道我应该设置什么属性才能以编程方式更改此设置吗?

Does anyone know what property I'm supposed to set to be able to programmatically change this?

推荐答案

PPT 2007和更高版本的默认保存格式是新的XML格式(PPTX而不是PPT等).如果用户(或通过策略的IT员工)已在文件|保存以这种格式保存文件:无论出于何种原因,默认值都将变为选定的文件.

The default save format for PPT 2007 and later is the new XML format (PPTX rather than PPT and so on). If the user (or IT staff via policies) have overridden this in the File | Save | Save files in this format: then the default becomes whatever they've selected, for whatever reason.

像这样的应用程序范围内的默认值通常不会通过对象模型公开;它们存储在注册表中.在这种情况下,在

App-wide defaults like this typically aren't exposed via the object model; they're stored in the registry. In this case, in

HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\PowerPoint\Options

用于PPTX的DefaultFormat DWORD = 27

DefaultFormat DWORD=27 for PPTX

用正确的版本替换上述14.0; PPT 2007为12.0,2010为14.0,依此类推(否13.0).

Substitute the correct version for 14.0 above; 12.0 for PPT 2007, 14.0 for 2010, and so on (no 13.0).

如果您可以在PPT未运行时将所需的值写入注册表 ,则可以重置默认值.如果您在PPT运行时写入reg,它将不会影响PPT的当前实例,并且当PPT退出时您的更改将被覆盖.

If you can write the value you want to the registry when PPT isn't running, you can reset the defaults. If you write to the reg while PPT's running, it won't affect the current instance of PPT, and your changes will be overwritten when PPT quits.

这篇关于如何在PowerPoint中设置默认的保存格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆