Tag: powerpoint

从Excel VBA编辑embedded的PowerPoint

我有一个Excel工作簿中embeddedPowerPoint演示文稿。 如何使用VBA编辑这个(打开,复制幻灯片,添加数据到幻灯片,closures)?

Powerpoint VBA – 编辑embedded式Excel OLE对象中表的列名

如果你运行下面的代码,你会得到一个非常有趣的结果(只有运行PowerPoint时,在运行之前closures所有的Excel实例): 'Optional – Include the "Microsoft Excel 16.0 Object Library" Option Explicit Public Sub test() Dim oslide As slide Set oslide = ActivePresentation.Slides.add(1, ppLayoutBlank) Dim oshape As Shape Set oshape = oslide.Shapes.AddOLEObject(30, 30, 50, 50, "Excel.Sheet") oshape.OLEFormat.Object.Sheets(1).ListObjects.add(1) 'xlSrcRange oshape.OLEFormat.Object.Sheets(1).Cells(1, 1) = "fewewq" oshape.OLEFormat.Object.Close End Sub embedded式对象已成功创build,表中存在指定的数据。 但是,当您单击embedded的对象时出现以下错误: 没有足够的内存可供阅读工作表。 不能再以任何其他方式访问该对象,并且对象的损坏特性在文档closures/打开时仍然存在并重新启动。 我已经validation过这个问题,除了我已经testing过的所有系统(PowerPoint / Excel 2016,Windows 7 X64)之外,都会发生。 […]

使用Excel VBAclosuresPowerpoint对象(不使用Powerpoint.Application)

希望有人可以帮助我一些VBA代码。 我使用VBA循环将Excel图表,文本框和表格粘贴到Powerpoint模板中。 但是,因为我不能确定用户将安装Powerpoint对象库,所以我不能使用Dim PPTApp作为Powerpoint.Applicationtypes的语法。 我使用对象。 它工作很好。 除了一件:closuresPowerpoint。 码: Dim oPPTPres As Object ' Late binding: This is a PowerPoint.Presentation but we cannot assume that the Microsoft PowerPoint 11 library will be loaded in the workbook that this module has been copied to. Dim oPPTShape As Object ' Late binding: This is a PowerPoint.Shapebut we cannot […]

有没有办法告诉PowerPoint不要在创build图表时打开Excel?

Slide.Shapes.AddChart()自动打开Excel。 即使我很快做Chart.ChartData.Workbook.Application.Visible = false ,它仍然显示一会儿。 这使得自动化的图表创build容易出错,因为用户不得不尝试不断popup的Excel应用程序。 使用WithWindow = false打开演示文稿将在创build新图表时仍然打开Excel。

如何将表格从Excel复制到PowerPoint – VBA

我找不到任何方法来做到这一点。 我现在所拥有的就是把它作为一个图像复制出来: Dim XLApp As Excel.Application Dim PPSlide As Slide Set XLApp = GetObject(, "Excel.Application") XLApp.Range("A1:B17").Select XLApp.Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture PPSlide.Shapes.Paste.Select 这就像一个魅力,但它有可能得到它复制范围作为一个表而不是图片?

EXcel VBA:Excelmacros在PowerPoint中创build表

我的要求是我有一个包含一些数据的Excel。 我想从Excel中select一些数据并打开PowerPoint文件 在PowerPoint中创build表格并填入数据 现在我已经成功地从excel中收集数据,通过Excel VBA代码打开一个PowerPoint文件。 从Excel打开PowerPoint的代码。 Set objPPT = CreateObject("Powerpoint.application") objPPT.Visible = True Dim file As String file = "C:\Heavyhitters_new.ppt" Set pptApp = CreateObject("PowerPoint.Application") Set pptPres = pptApp.Presentations.Open(file) 现在,我如何在Excel中创buildPowerPoint中的表格并填充数据。 及时的帮助将非常感激。 提前致谢,

通过PowerPoint自动化Excel – 本地窗口不暴露全部对象模型(即Linksources)

背景 我正在运行代码(从PowerPoint): 在演示文稿中循环播放每一张幻灯片。 检查每个形状以确定它是否是图表。 如果是图表,请激活底层的Excel工作表,然后将此底层文件中的链接更改为新的源代码。 我注意到到excel的链接并不存在于整个PPT级别[通过Info ],它们被故意链接到每个图表,以便可以在不访问源excel文件的情况下编辑表示 。 代码工作 – 广泛。 有一个正在进行的错误( 现在代码运行良好 ),我认为去networking和内存的稳定性(约15图表后失败),我正在closures屏幕更新closures屏幕更新为Powerpoint 。 题 我访问的所有图表都链接到其他工作簿。 然而,当Excel工作簿暴露给PowerPoint时,即使代码处理每个链接, Linksources也不会显示在Locals窗口中(下图显示链接存在) 我翻转自动化从Excel访问PowerPoint包,相同的结果。 没有Linksources 。 为什么当使用Excel自动化PowerPoint时,在“ 本地”窗口中不能使用完整的对象模型? 这是我偶然发现的一个本地化故障,还是更广泛的问题? 下图显示了通过链接进行迭代的代码( pplvariables,但是xlWBvariables没有Linksources )。 码 Sub FastUpdate() Dim sld As Slide Dim shp As Shape Dim pptchrt As Chart Dim pptChrtData As ChartData Dim xlWB As Excel.Workbook Dim lngStart As Long […]

closuresPowerpoint的屏幕更新

我正在编写一个脚本,通过一个文件夹循环,并从一些条件创buildgraphics,然后将其导出到powerpoint。 目前,创build130个graphics需要290秒,其中286个被powerpoint使用。 我怀疑这个主要原因是无法closures屏幕更新。 我已经尝试使用从这里http://skp.mvps.org/ppt00033.htm的代码来解决这个问题。 但是,我没有注意到任何影响。 虽然我可以在后台切换并保留幻灯片,但在切换到Powerpoint时,所有更改都将显示出来,您可以基本看到它如何减慢程序的速度。 任何人都知道我是如何使用这个代码? 如果是在类模块中,我应该做别的什么,或者我做错了什么? 下面是我借用的代码片段和一个我如何尝试调用它的例子: Option Explicit ' UserDefined Error codes Const ERR_NO_WINDOW_HANDLE As Long = 1000 Const ERR_WINDOW_LOCK_FAIL As Long = 1001 Const ERR_VERSION_NOT_SUPPORTED As Long = 1002 ' API declarations for FindWindow() & LockWindowUpdate() ' Use FindWindow API to locate the PowerPoint handle. Declare Function FindWindow Lib "user32" Alias […]

使用apache poi将HSSF(excel)embedded到HSLF(ppt)中

我想embedded到使用Apache poi的演示文稿(PPT)的Excel表。 我们应该怎么做? 如果有人知道,请帮助我。

在PowerPoint演示文稿中旋转3D图表

我在Excel中创build了一个可以旋转3D图表的macros。 我将图表复制到PowerPoint中,设置代码以在幻灯片显示时在PowerPoint中运行。 代码运行,但我不能得到它实际上改变屏幕上显示的内容。 幻灯片处于编辑模式时,graphics旋转。 任何想法如何让代码不只是运行(我可以看到debugging数字显示),但更新屏幕时,在演示模式? 我的代码是: Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Public Sub SpinTheChart() RotateX = ActivePresentation.Slides(2).Shapes(2).Chart.ChartArea.Format _ .ThreeD.RotationX Do While ActivePresentation.SlideShowWindow.View.CurrentShowPosition = 2 RotateX = RotateX + 7 If RotateX > 360 Then RotateX = RotateX – 360 ActivePresentation.Slides(2).Shapes(2).Chart.ChartArea.Format _ .ThreeD.RotationX = RotateX DoEvents Sleep 125 Debug.Print RotateX Loop […]