GVKun编程网logo

PowerPoint多种保存格式的作用和技巧

23

最近很多小伙伴都在问PowerPoint多种保存格式的作用和技巧这两个问题,那么本篇文章就来给大家详细解答一下,同时本文还将给你拓展Aspose.slides企业案例:Oracle咨询服务实施了Exc

最近很多小伙伴都在问PowerPoint多种保存格式的作用和技巧这两个问题,那么本篇文章就来给大家详细解答一下,同时本文还将给你拓展Aspose.slides企业案例:Oracle 咨询服务实施了 Excel 和 PowerPoint 格式的按需可定制报告系统、PowerPoint Interop:如何检测用户何时关闭PowerPoint而又不保存更改?、Powerpoint Notes部分格式化VBA、Powerpoint 宏更改文本格式等相关知识,下面开始了哦!

本文目录一览:

PowerPoint多种保存格式的作用和技巧

PowerPoint多种保存格式的作用和技巧

PPT制作完成后,我们会习惯将它保存为“演示文稿”格式,这样会带来很多不便,比如发布会时打开就看到了后面保密内容;比如想用自己做的PPT做模板时却要重新做一份等,其实,PPT提供的多种保存模式完全可以满足我们的特殊需求

PPT制作完成后,我们会习惯将它保存为“演示文稿”格式,这样会带来很多不便,比如发布会时打开就看到了后面保密内容;比如想用自己做的PPT做模板时却要重新做一份等,其实,PPT提供的多种保存模式完全可以满足我们的特殊需求。

1.保存为放映格式

课件制作完毕后,可将其保存为“PowerPoint放映”(扩展名PPS),上课时双击文件图标就可直接开始放映,而不再出现幻灯片编辑窗口。这样保存的优点是显而易见的:(1)操作方便,省略了打开PowerPoint、点击[观看放映]的繁琐步骤;(2)可以避免放映时由于操作不慎等原因而将后面的演示内容提前“曝光”;(3)可以避免课件内容被他人意外改动而导致“面目全非”(这一点在公用电脑上显得尤其重要)。也许您担心这样保存之后无法再做进一步的修改,其实您尽可放心,我们的对策也有两个:再保存一份PPT演示文稿作为副本;将PPS放映文件在PowerPoint中打开。不信您试试看,熟悉的编辑窗口是不是又出现了?

2.保存为设计模板

也许您经常要制作同种风格类型的幻灯片课件,而PowerPoint提供的设计模板又不太适合您的需要,所以您只好一次次地从零开始重新编排格式,真是辛苦又无奈。其实,您只要精心设计好一个幻灯片,然后把它保存为PowerPoint设计模板就可以了。今后再制作同类幻灯片时,就可以随时轻松调用。

3.保存为大纲/RTF文件

如果您只想把课件中的文本部分保存下来,可以把课件保存为大纲/RTF文件。RTF格式的文件可以用Word等软件打开,非常方便。但有一点需要注意,根据笔者的经验,用这种方法只能保存添加在文本占位符(即在幻灯片各版式中用虚线圈出的用于添加文本的方框)中的文本,而自己插入的文本框中的文本以及艺术字等无法保存。

4.保存为Word文档

如果您还想把课件中每张幻灯片的图像也显示在Word中,还可以把它保存为Word文档(扩展名DOC)。不过,这次直接保存是不行的,我们还需要使用另一项功能--发送。点击“文件→发送→MicrosoftWord”,然后根据提示选择需要的版式及粘贴方式,就可以在Word中看到每张幻灯片的“芳容”了,而且,用这种方法还可以将幻灯片备注也一并发送过来。最后,把文件保存为Word文档就可以了(但如果您当初选择的版式是“仅使用大纲”,文件就会被直接保存为上面提到的RTF格式,幻灯片图像不会被保存)。需要提醒一点,在Word文档中,每张幻灯片都是以图片对象的形式嵌入的,我们无法对其内容再做编辑了。

5.保存为图片

PowerPoint也能当图像编辑软件?当然可以了。在PowerPoint中,调整图片格式、组合图片、添加文本都是极方便极容易的,更可贵的是,它还提供了各种背景样式、自选图形以及大量的艺术字效果(用专业图像编辑软件制作出这些特效字往往很麻烦),同时,还可以轻松实现对象的移动、缩放、旋转、翻转等。当您满意之后,把幻灯片保存为图片格式就可以了。PowerPoint提供多种图片保存格式,如GIF、JPEG、BMP、PNG等,您可以根据实际需要进行选择。同时,您还可以选择是输出全部幻灯片,还是只输出当前幻灯片。如果是输出全部幻灯片,保存后的图片会统一放在同一个文件夹里。利用这种方法,您还可以把自己重要的课件另存为图片以备他用。

6.保存为Web页

当看到别人制作的课件中有自己渴望已久的图片或音乐、视频时,想不想把它们提取出来以便自己使用?别急,把演示文稿另存为Web页就一切都搞定了!保存之后,会生成一个网页文件及一个同名文件夹,打开文件夹看一看,您想要的所有东西(图片、音乐、视频……)都变成一个个单独的文件乖乖地躺在里面了。

总结

以上是小编为你收集整理的PowerPoint多种保存格式的作用和技巧全部内容。

如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。

Aspose.slides企业案例:Oracle 咨询服务实施了 Excel 和 PowerPoint 格式的按需可定制报告系统

Aspose.slides企业案例:Oracle 咨询服务实施了 Excel 和 PowerPoint 格式的按需可定制报告系统

关于Oracle Consulting

Oracle 咨询服务为公司提供解决方案。在为客户关系管理系统构建按需报告系统时,他们需要能够将自定义报告保存为 Microsoft Excel 或 PowerPoint 文件。为了实现这一点,在项目团队成员之一的推荐下使用了Java 版 Aspose.Cells 和 Java版Aspose.Slides 。

Aspose API集成到 Oracle 的 Java 环境中,并在不依赖 Microsoft Office 应用程序的情况下生成所需的文档。

关于Oracle

Oracle为零售和自然资源等不同行业提供大量产品和服务。该公司以其数据库解决方案和企业应用程序而闻名。Oracle 咨询服务是认证顾问的行业领导者,拥有超过 13,000 名咨询专家。他们使用 Oracle 的最佳实践实施解决方案,并确保它们与客户的战略和目标保持一致。

问题

Oracle 提供咨询服务以及软件和硬件。他们与一家领先的集成技术公司合作,为客户关系管理 (CRM) 系统开发了按需报告系统。

CRM系统很复杂。他们跟踪复杂的关系和大量交易。如果使用得当,它们可以让组织了解他们与客户的关系并简化他们的销售和营销活动,从而为组织带来真正的推动力。当然,任何此类活动的核心是良好的情报。任何系统中保存的数据都是无用的,除非您可以查询它以从中学习。因此,系统的报告方非常重要。

该项目

任何报告系统的一部分都是文件交付。用户可以创建自己的报告是不够的,他们需要一种方法来保存和共享结果。具体来说,用户希望能够创建可用于演示文稿和电子表格的报告。文档交付模块中内置了一些自定义功能。

Aspose.Slides for Java和Aspose.Cells for Java用于将报告保存在 Microsoft Office 兼容文档中。Aspose Java API非常适合 Java 环境。他们在不依赖 Microsoft Office 的情况下生成符合 Microsoft Office 的文档这一事实是一个巨大的优势。

 

 

报表系统由多人负责,文件传递模块由一人单独负责。那位开发人员遇到了一些有趣的挑战。例如,将报告数据添加到演示文稿并不像听起来那么容易。在正常情况下,演示文稿是手动创建的,并且有人在那里判断幻灯片上的内容可以阅读,一切都适合它并且看起来不错。自动创建报告时,需要确保最终结果看起来不错,这取决于文档传递系统。这方面是开发人员最具挑战性的方面之一。

Oracle Consulting 成功的证明在于客户对系统的接受。该报告系统已在多个国家部署,并将在全球推广。

寻找解决方案

对于某些项目,寻找解决方案是该过程中耗时的部分。按需报告系统有很多复杂性,但使用什么工具进行文档转换,并不是其中之一。Aspose.Slides for Java和Aspose.Cells for Java由一位已经有使用Aspose API经验的团队成员推荐。使用Aspose的决定很简单。

文档格式有自己的逻辑。学习与一个人一起工作可能需要时间,即使您有一个为您完成大部分工作的类库的帮助。即使有学习曲线,使用Aspose 产品也为 Oracle 节省了大量时间。

概括

在为复杂的报告系统实施文档交付模块时,Oracle Consultancy 使用了受信任的应用程序:用于 Java 的 Aspose.Slides 和用于 Java的Aspose.Cells。它与现有的开发环境顺利集成,不需要 Windows 自动化,还提供了强大的文档控件。重要的是,与从头开始构建文档管理系统相比,它们节省了宝贵的时间。

PowerPoint Interop:如何检测用户何时关闭PowerPoint而又不保存更改?

PowerPoint Interop:如何检测用户何时关闭PowerPoint而又不保存更改?

如何解决PowerPoint Interop:如何检测用户何时关闭PowerPoint而又不保存更改??

我有一个WPF应用程序,可将PowerPoint文件存储在sql Server数据库中。该应用程序具有一个编辑按钮,可以打开给定的PowerPoint文件进行编辑。由于PowerPoint是基于文件的应用程序,因此我必须使用临时文件来加载和保存PowerPoint。

为此目的我编写的帮助程序类具有绑定到编辑按钮的IsEnabled属性的属性;我们在编辑过程中禁用该按钮。编辑过程中,有一个ManualResetEvent会在此帮助程序类中挂起Edit方法。我钩上Presentation.Saved事件以检测用户何时将更改保存到PowerPoint中。不用说,这都是精心策划的。

在测试过程中,我们发现,如果用户在不保存更改的情况下关闭PowerPoint,然后对随后出现的“您希望保存更改”对话框回答“是”,则Presentation.Saved不会触发直到Presentation.CloseFinal事件已经执行之后,对我们而言,对此做任何事情都为时已晚。 Presentation.CloseFinal是我们从磁盘检索保存的文件并将其存储到数据库的地方。如果用户单击PowerPoint中的“保存”按钮,则会立即触发Presentation.Saved

为了解决该问题,我钩住了PresentationClose事件并编写了以下代码。

// Detects when the user closes the PowerPoint after changes have been made.
private void Application_PresentationClose(Presentation presentation)
{
    // If the user has edited the presentation before closing PowerPoint,// this event fires twice.  The first time it fires,presentationSaved
    // is msoFalse.  That''s how we kNow the user has edited the PowerPoint.
    if (presentation.Saved == MsoTriState.msoFalse)
        IsDirty = true;
}

然后我检查IsDirty中的Presentation.CloseFinal属性,并将PowerPoint保存到数据库(如果将其设置为true)。

不幸的是,出现了无法预料的皱纹;似乎没有可靠的方法来确定用户是否放弃了更改。第二次触发此事件时,无论用户对“保存更改吗?”的回答如何,Presentation.Saved属性始终设置为MsoTriState.msoTrue。对话框。

如果用户放弃了所做的更改,PowerPoint Interop中是否有一种方法可以避免承担将未更改的文件保存到数据库的费用?


作为参考,以下是整个帮助器类:

using Microsoft.Office.Core;
using Microsoft.Office.Interop.PowerPoint;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Xps.Packaging;
using PropertyChanged;  // PropertyChanged.Fody 

namespace Helpers
{
    /// <summary>
    /// Helper class for PowerPoint file handling
    /// </summary>
    [AddINotifyPropertyChangedInterface]
    public sealed class PowerPointApplication : Idisposable
    {
        private Application _application;
        private Presentation _presentation;
        private string _tempFolder;
        private string _pptPath;
        private string _extension;

        /// <summary>
        /// Used to block the Edit method until the PowerPoint presentation is closed.
        /// </summary>
        private ManualResetEvent manualResetEvent = new ManualResetEvent(false);

        public byte[] PptData { get; private set; }
        public byte[] PptxData { get; private set; }
        public byte[] JpgData { get; private set; }

        /// <summary>
        /// Indicates whether any instance of PowerPointApplication is in an edit state.
        /// Used to disable Edit PowerPoint buttons.
        /// </summary>
        public static bool IsEditing { get; private set; }

        /// <summary>
        /// Indicates if the PowerPoint file has been saved after changes were made to it.
        /// </summary>
        public bool IsSaved { get; set; }

        /// <summary>
        /// Indicates if the PowerPoint file has been changed but not saved.
        /// </summary>
        public bool IsDirty { get; set; }

        public PowerPointApplication()
        {
            _tempFolder = Path.GetTempPath();

            if (!Directory.Exists(_tempFolder))
                Directory.CreateDirectory(_tempFolder);

            _application = new Application();
            _application.PresentationSave += Application_PresentationSave;
            _application.PresentationClose += Application_PresentationClose;
            _application.PresentationCloseFinal += Application_PresentationCloseFinal;
        }

        // Detects when the user presses the "Save" button in PowerPoint
        private void Application_PresentationSave(Presentation presentation)
        {
            IsSaved = true;
        }

        // Detects when the user closes the PowerPoint after changes have been made.
        private void Application_PresentationClose(Presentation presentation)
        {
            // If the user has edited the presentation before closing PowerPoint,presentationSaved
            // is msoFalse.  That''s how we kNow the user has edited the PowerPoint.
            // It fires again after the users has responded to the "save changes?" dialog.
            if (presentation.Saved == MsoTriState.msoFalse)
                IsDirty = true;
        }

        private void Application_PresentationCloseFinal(Presentation presentation)
        {
            if ((IsDirty || IsSaved) && File.Exists(_pptPath))
            {
                var data = File.ReadAllBytes(_pptPath);

                if (_extension == "pptx")
                {
                    PptxData = data;
                    PptData = GetPpt(presentation);
                }
                else
                {
                    PptData = data;
                    PptxData = GetPptx(presentation);
                }
                JpgData = GetJpg(presentation);

                IsSaved = true;
                IsDirty = false;
            }
            manualResetEvent.Set();
            IsEditing = false;

            Task.Run(() => DeleteFileDelayed(_pptPath));
        }

        /// <summary>
        /// Waits for PowerPoint to close,and then makes a best effort to delete the temp file.
        /// </summary>
        private static void DeleteFileDelayed(string path)
        {
            if (path == null) return;
            var file = new FileInfo(path);

            Thread.Sleep(5000);
            try
            {
                file.Delete();
            }
            catch { }
        }

        /// <summary>
        /// Opens the provided PowerPoint byte array in PowerPoint and displays it.
        /// </summary>
        public void Edit(byte[] data,string ext = "xml")
        {
            _extension = ext;
            _pptPath = GetTempFile(_extension);

            if (data == null)
            {
                // Open a blank presentation and establish a save path.
                _presentation = _application.Presentations.Add(MsoTriState.msoTrue);
                _presentation.SaveAs(_pptPath,PpSaveAsFileType.ppSaveAsXMLPresentation);
                IsSaved = false;
            }
            else
            {
                // Save the data to a file and open it.
                File.WriteallBytes(_pptPath,data);
                _presentation = _application.Presentations.Open(_pptPath);
                IsEditing = true;
            }

            // Make sure IsEnabled state of WPF buttons is properly set.
            ApplicationHelper.DoEvents();
            Thread.Sleep(100);
            ApplicationHelper.DoEvents();

            // Wait for PowerPoint to exit.
            manualResetEvent.WaitOne();
        }

        /// <summary>
        /// Opens the provided PowerPoint byte array in PowerPoint without displaying it.
        /// </summary>
        public void Open(byte[] data,string ext = "xml")
        {
            _extension = ext;
            _pptPath = GetTempFile(ext);
            File.WriteallBytes(_pptPath,data);
            _presentation = _application.Presentations.Open(_pptPath,WithWindow: MsoTriState.msoFalse);
            IsEditing = true;
        }

        public void Close()
        {
            _presentation.Close();
        }

        public byte[] GetJpg() { return GetJpg(_presentation); }
        /// <summary>
        /// Returns a byte array containing a JPEG image of the first slide in the PowerPoint.
        /// </summary>
        public byte[] GetJpg(Presentation presentation)
        {
            presentation.SavecopyAs(_tempFolder,PpSaveAsFileType.ppSaveAsJPG,MsoTriState.msoFalse);
            byte[] result = File.ReadAllBytes(Path.Combine(_tempFolder,"Slide1.jpg"));
            File.Delete(Path.Combine(_tempFolder,"Slide1.jpg"));
            return result;
        }

        public byte[] GetPptx() { return GetPptx(_presentation); }

        public byte[] GetPptx(Presentation presentation)
        {
            var path = Path.ChangeExtension(_pptPath,"pptx");
            presentation.SavecopyAs(path,PpSaveAsFileType.ppSaveAsOpenXMLPresentation,MsoTriState.msoFalse);
            byte[] result = File.ReadAllBytes(path);
            return result;
        }

        public byte[] GetPpt(Presentation presentation)
        {
            var path = Path.ChangeExtension(_pptPath,"ppt");
            presentation.SavecopyAs(path,PpSaveAsFileType.ppSaveAsPresentation,MsoTriState.msoFalse);
            byte[] result = File.ReadAllBytes(path);
            return result;
        }

        /// <summary>
        /// Returns an XPS document of the presentation.
        /// </summary>
        public XpsDocument ToXps(string pptFilename,string xpsFilename)
        {
            var presentation = _application.Presentations.Open(pptFilename,MsoTriState.msoTrue,MsoTriState.msoFalse,MsoTriState.msoFalse);
            presentation.ExportAsFixedFormat(xpsFilename,PpFixedFormatType.ppFixedFormatTypeXPS);
            return new XpsDocument(xpsFilename,FileAccess.Read);
        }

        /// <summary>
        /// Returns a path to a temporary working file having the specified extension.
        /// </summary>
        private string GetTempFile(string extension)
        {
            return Path.Combine(_tempFolder,Guid.NewGuid() + "." + extension);
        }

        #region Idisposable implementation
        public void dispose()
        {
            _application.PresentationSave -= Application_PresentationSave;
            _application.PresentationClose -= Application_PresentationClose;
            _application.PresentationCloseFinal -= Application_PresentationCloseFinal;

            IsEditing = false;
        }
        #endregion
    }
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

Powerpoint Notes部分格式化VBA

Powerpoint Notes部分格式化VBA

我很好奇为什么您不仅仅使用程序界面在Notes Master中设置项目符号。这比编写VBA容易得多。

如果注释页面上只有1个占位符而不是2个占位符,则会发生此错误。这是一个更强大的例程,用于检查形状类型以及它是否实际包含文本:

Sub Button1()
    Dim oSlide As Slide
    Dim oShape As Shape
    
    For Each oSlide In ActivePresentation.Slides
        For Each oShape In oSlide.NotesPage.Shapes
            If oShape.Type = msoPlaceholder Then
                If oShape.PlaceholderFormat.Type = ppPlaceholderBody Then
                    If oShape.HasTextFrame Then
                        If oShape.TextFrame.HasText Then
                            With oShape.TextFrame.TextRange.ParagraphFormat.Bullet
                                .Type = ppBulletPicture
                                .Picture ("C:/picture.png")
                                .RelativeSize = 1.4
                            End With
                        End If
                    End If
                End If
            End If
        Next oShape
    Next oSlide
End Sub

Powerpoint 宏更改文本格式

Powerpoint 宏更改文本格式

如何解决Powerpoint 宏更改文本格式?

我试图创建一个宏来用逗号替换所有的点,反之亦然 演示文稿,因为我正在从西班牙语翻译成英语,12.000,3 应该被翻译成 12,000.3。问题是我只知道如何用 C 编写代码,而且我也不知道太多,所以我不得不环顾四周并找到一些可以修改以满足我的需要的现有代码。我找到了与我需要的类似的东西并最终得到了这个,它工作得很好,但通过更改文本的下划线和“粗体”部分来弄乱文本的随机(可能不是随机的,但我没有找到任何模式)部分文本(有时将粗体或下划线应用于随机文本,或者采用粗体和下划线文本并将其设置为正常)。宏还弄乱了项目符号和编号,改变了这一点:

-
  ->

进入这个:

-
-

它通常发生在整个文本框上,将它们更改为粗体并删除所有缩进。 我的理解是代码检查文本“块”,无论是从表格、文本框还是...并尝试找到模式。也许如果有一种方法可以逐字检查这些文本“块”中的字词,问题就会消失。

预先感谢您的任何建议,如果代码不好,请多多包涵,这是我第一次尝试 VBA。

Sub use_regex_decimal_point()
    Dim regX        As Object
    Dim osld        As Slide
    Dim oshp        As Shape
    Dim intSlide    As Integer
    Dim strInput    As String
    Dim b_found     As Boolean
    Dim iRow        As Integer
    Dim iCol        As Integer
    
    Set regX = CreateObject("vbscript.regexp")
    With regX
        
        .Global = TRUE
        .Pattern = "(\d)\.(\d)"
        
    End With
    
    For Each osld In ActivePresentation.Slides
        
        For Each oshp In osld.Shapes
            
            If oshp.HasTable Then
                
                For iRow = 1 To oshp.Table.Rows.Count
                    
                    For iCol = 1 To oshp.Table.Columns.Count
                        
                        strInput = oshp.Table.Cell(iRow,iCol).Shape.TextFrame.TextRange.Text
                        
                        b_found = regX.Test(strInput)
                        If b_found = TRUE Then
                            
                            strInput = regX.Replace(strInput,"$1¬$2")
                            
                            oshp.Table.Cell(iRow,iCol).Shape.TextFrame.TextRange = strInput
                            
                        End If
                        
                    Next iCol
                    
                Next iRow
                
            Else
                
                If oshp.HasTextFrame Then
                    
                    If oshp.TextFrame.HasText Then
                        
                        strInput = oshp.TextFrame.TextRange.Text
                        b_found = regX.Test(strInput)
                        
                        If b_found = TRUE Then
                            
                            strInput = regX.Replace(strInput,"$1.$2")
                            oshp.TextFrame.TextRange = strInput
                            
                        End If
                        
                    End If
                    
                End If
                
            End If
            
        Next oshp
        
    Next osld

    
    Set regX = CreateObject("vbscript.regexp")
    With regX
        
        .Global = TRUE
        .Pattern = "(\d)\,(\d)"
        
    End With
    
    For Each osld In ActivePresentation.Slides
        
        For Each oshp In osld.Shapes
            
            If oshp.HasTable Then
                
                For iRow = 1 To oshp.Table.Rows.Count
                    
                    For iCol = 1 To oshp.Table.Columns.Count
                        
                        strInput = oshp.Table.Cell(iRow,"$1.$2")
                            
                            oshp.Table.Cell(iRow,"$1.$2")
                            oshp.TextFrame.TextRange = strInput
                            
                        End If
                        
                    End If
                    
                End If
                
            End If
            
        Next oshp
        
    Next osld

    
    Set regX = CreateObject("vbscript.regexp")
    With regX
        
        .Global = TRUE
        .Pattern = "(\d)\¬(\d)"
        
    End With
    
    For Each osld In ActivePresentation.Slides
        
        For Each oshp In osld.Shapes
            
            If oshp.HasTable Then
                
                For iRow = 1 To oshp.Table.Rows.Count
                    
                    For iCol = 1 To oshp.Table.Columns.Count
                        
                        strInput = oshp.Table.Cell(iRow,"$1,$2")
                            
                            oshp.Table.Cell(iRow,"$1.$2")
                            oshp.TextFrame.TextRange = strInput
                            
                        End If
                        
                    End If
                    
                End If
                
            End If
            
        Next oshp
        
    Next osld
    
    Set regX = nothing
    
End Sub

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

关于PowerPoint多种保存格式的作用和技巧的介绍现已完结,谢谢您的耐心阅读,如果想了解更多关于Aspose.slides企业案例:Oracle 咨询服务实施了 Excel 和 PowerPoint 格式的按需可定制报告系统、PowerPoint Interop:如何检测用户何时关闭PowerPoint而又不保存更改?、Powerpoint Notes部分格式化VBA、Powerpoint 宏更改文本格式的相关知识,请在本站寻找。

本文标签: