Jump to content

Search the Community

Showing results for tags 'powerpoint'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 5 results

  1. I have started to rewrite the PowerPoint UDF similar to the Word, Excel and Outlook UDF. The new UDF will not be compatible with the existing one. I will add examples, documentation, a section in the wiki etc. So far the following functions have been coded - more are on the ToDo list. _PPT_Open: Open a connection to a running instance of PowerPoint or start a new one_PPT_Close: Close a PowerPoint instance_PPT_PresentationAttach: Attach to an already opened presentation_PPT_PresentationClose: Close a presentation_PPT_PresentationExport: Export one/multiple/all slides as PDF or XPS._PPT_PresentationExportGraphic: Export one/multiple/all slides in a graphic format._PPT_PresentationNew: Create a new presentation_PPT_PresentationOpen: Open an existing presentation_PPT_PresentationSave: Save a presentation_PPT_PresentationSaveAs: Save a presentation to another location or with another type_PPT_SlideAdd: Add slide(s) to a presentation_PPT_SlideCopyMove: Copy, move, duplicate slide(s)_PPT_SlideDelete: Delete slide(s)_PPT_SlideShow: Show a presentationWhich functions do you want me to add to the UDF? ToDo list: create slide (JLogan3o13) - Done: _PPT_SlideAddApply template to slide (JLogan3o13) - Done: _PPT_SlideAddApply theme to slide (JLogan3o13)Cut/Copy/Duplicate/Move/Delete slide(s) (JLogan3o13) - Done: _PPT_SlideCopyMove, _PPT_SlideDeleteExport slides (JLogan3o13) - Done: _PPT_PresentationExportCut/Copy/Duplicate/Move/Delete shape(s) (JLogan3o13)ApplyAnimation, Select, SetDefaultProperties, and zOrder for shape(s) (JLogan3o13)Searching and replacing text (pcjunki)Export slides in a graphic format (JPG, GIF, PNG ...) (UEZ) - Done: _PPT_PresentationExportGraphicAdded the Alpha version to the download forum.
  2. water

    PowerPoint UDF

    Version 0.0.5.0

    598 downloads

    Fourth Alpha version of the PowerPoint UDF. Something for you to play with. Lot of things still missing: Lot of functions, help file etc. If you want to discuss the functions please post here. BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort
  3. Hi all. I am trying to do 2 things but i cannot seem to get any traction on how to read/implement this idea. Premise: PowerPoint file in C\temp\presentation.pptx that contains on the first slide 2 entries as "<one>" and "<two>" which need to be replaced with "user1" and "user2", then a silent Outlook send mail containing the file with a predefined body and subject. I narrowed it down to COM objects as the Office does not like intrusive open AutoIt functions. I installed OLE/COM Object Viewer to understand how to create the commands but i am still stuck. So far i am trying to user water's code but i suck COM object i was originally trying to modify Dim $oPPT, $oPres $oPPT = ObjCreate("PowerPoint.Application") $oPPT.Visible = True $oPres = $oPPT.Presentations.Read Water's code below (0.1% modified) #include <File.au3> #include "PowerPoint.au3" #include <misc.au3> Global $sFile = "C:\temp\presentation.pptx" Global $sString2Search = "<username>", $sString2Replace = "Password", $iReplaceOnce = 1, $sFullLogFile = "C:\temp\pptxlog.txt" _ProcessPpt($sFile) Func _ProcessPpt($sFile) $oApp = _PPT_PowerPointApp() Local $bChange = False Local $oInterface = $oApp.Presentations Local $oPresentation = $oInterface.Open($sFile, False, False, False) If @error Then _FileWriteLog($sFullLogFile, "E Error " & @error & " opening File " & $sFile) Return SetError(1, 0, 0) EndIf ;it does not even open my file and from here not sure how to read the text and replace it EndFunc ;==>_ProcessPpt
  4. Hi, I'm getting this error while trying to initialize a com event handler for Office PowerPoint events. The PowerPoint file is displayed correctly, but no events are captured as the ObjEvent() fails : err.number is: -2147316576 err.windescription: Type mismatch. err.description is: err.source is: err.helpfile is: err.helpcontext is: 0 err.lastdllerror is: 0 err.scriptline is: 23 err.retcode is: 0 The sourcecode is: Local $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler Func MyErrFunc($oError) ConsoleWrite("err.number is: " & @TAB & $oError.number & @CRLF & _ "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ "err.description is: " & @TAB & $oError.description & @CRLF & _ "err.source is: " & @TAB & $oError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ "err.retcode is: " & @TAB & $oError.retcode & @CRLF & @CRLF) EndFunc Local $AppPowerPoint = ObjCreate("PowerPoint.Application") If Not IsObj($AppPowerPoint) Then MsgBox(0, "Error", "$AppPowerPoint is not an Object.") Else MsgBox(0, "Error", "Successfully created Object $AppPowerPoint.") EndIf Local $pptEvt = ObjEvent($AppPowerPoint, "PowerPointEvent_") ; Initialize PowerPoint COM event handlers Local $OpenPresentation = $AppPowerPoint.Presentations.Open("C:\Users\DagHendrik\Desktop\test.ppt",True, False, False) $OpenPresentation.SlideShowSettings.ShowPresenterView = 0 $OpenPresentation.SlideShowSettings.ShowType = 1 Local $SlideShowWindow = $OpenPresentation.SlideShowSettings.Run() While True Sleep(10) WEnd Func PowerPointEvent_SlideShowNextSlide($obj) ConsoleWrite("GetCurrentSlide = " & ($SlideShowwindow.View.Slide.SlideIndex-1) & "<"& @LF) EndFunc Func PowerPointEvent_SlideShowOnNext($obj) ConsoleWrite("GetCurrentSlide = " & ($SlideShowwindow.View.Slide.SlideIndex-1) & "<"& @LF) EndFunc The script continues fine, but no event are fired as the line with Local $pptEvt = ObjEvent($AppPowerPoint, "PowerPointEvent_") ; Initialize PowerPoint COM event handlers fails. I'm using the latest autoit (v3.3.8.1, 32 bit) And I'm running Office PowerPoint 2013 32bit on a Windows 8 Pro 64 bit installation. Any idea why the ObjEvent() fails? (EDIT: changed to autoit code formatting)
  5. Hello all, I was very happy to found the ppt wrapper: But unfortunately it is not working for PPT VIEWER 2010 (free from Microsoft) http://www.microsoft.com/download/en/details.aspx?id=13 So I wrote this script to be able to run the ppt on a second screen automatically (It works with the normal PPT 2010 as well !): ENJOY! I got the _GetMonitors() on this forum as well (not shure where...) Cramaboule Global $__MonitorList[1][5], $MonL[5], $MonT[5] #region Detect Monitor $Monitor = _GetMonitors() If $Monitor[0][0] = 2 Then If ($Monitor[1][1] = 0) And ($Monitor[1][2] = 0) Then; According to Microsoft, the Main Monitor has the coordinates 0,0, ..., ... $MonL[2] = $Monitor[2][1] ; Monitor 1 Main - Monitor 2 Display $MonT[2] = $Monitor[2][2] $MonL[1] = $Monitor[1][1] $MonT[1] = $Monitor[1][2] $Mon = 1 Else $MonL[2] = $Monitor[1][1] ; Monitor 2 Main - Monitor 1 Display $MonT[2] = $Monitor[1][2] $MonL[1] = $Monitor[2][1] $MonT[1] = $Monitor[2][2] $Mon = 2 EndIf Else $Mon = 1 ; Only 1 Monitor EndIf #endregion Detect Monitor ShellExecute(@WorkingDir&'\sitemp3.ppt',"",Default,Default, @SW_MINIMIZE ) WinWaitActive("[CLASS:PPTFrameClass]" ) ControlSend("[CLASS:PPTFrameClass]", "", "[CLASSNN:paneClassDC1]", "{F5}") WinSetTrans ( "[CLASS:screenClass]", "", 0 ) WinWaitActive("[CLASS:screenClass]" ) ;full screen mode WinSetTrans ( "[CLASS:screenClass]", "", 0 ) WinMove("[CLASS:screenClass]" , "" , $MonL[2] , $MonT[2] , Default, Default, 1) WinSetTrans ( "[CLASS:screenClass]", "", 255 ) While WinExists ("[CLASS:screenClass]" ) Sleep ("100") WEnd WinClose ("[CLASS:PPTFrameClass]" ) ;================================================================================================== ; Function Name: _GetMonitors() ; Description:: Load monitor positions ; Parameter(s): n/a ; Return Value(s): 2D Array of Monitors ; [0][0] = Number of Monitors ; [i][0] = HMONITOR handle of this monitor. ; [i][1] = Left Position of Monitor ; [i][2] = Top Position of Monitor ; [i][3] = Right Position of Monitor ; [i][4] = Bottom Position of Monitor ; Note: [0][1..4] are set to Left,Top,Right,Bottom of entire screen ; hMonitor is returned in [i][0], but no longer used by these routines. ; Also sets $__MonitorList global variable (for other subs to use) ; Author(s): xrxca (autoit@forums.xrx.ca) ;================================================================================================== Func _GetMonitors() $__MonitorList[0][0] = 0 ; Added so that the global array is reset if this is called multiple times Local $handle = DllCallbackRegister("_MonitorEnumProc", "int", "hwnd;hwnd;ptr;lparam") DllCall("user32.dll", "int", "EnumDisplayMonitors", "hwnd", 0, "ptr", 0, "ptr", DllCallbackGetPtr($handle), "lparam", 0) DllCallbackFree($handle) Local $i = 0 For $i = 1 To $__MonitorList[0][0] If $__MonitorList[$i][1] < $__MonitorList[0][1] Then $__MonitorList[0][1] = $__MonitorList[$i][1] If $__MonitorList[$i][2] < $__MonitorList[0][2] Then $__MonitorList[0][2] = $__MonitorList[$i][2] If $__MonitorList[$i][3] > $__MonitorList[0][3] Then $__MonitorList[0][3] = $__MonitorList[$i][3] If $__MonitorList[$i][4] > $__MonitorList[0][4] Then $__MonitorList[0][4] = $__MonitorList[$i][4] Next Return $__MonitorList EndFunc ;==>_GetMonitors ;================================================================================================== ; Function Name: _MonitorEnumProc($hMonitor, $hDC, $lRect, $lParam) ; Description:: Enum Callback Function for EnumDisplayMonitors in _GetMonitors ; Author(s): xrxca (autoit@forums.xrx.ca) ;================================================================================================== Func _MonitorEnumProc($hMonitor, $hDC, $lRect, $lParam) Local $Rect = DllStructCreate("int left;int top;int right;int bottom", $lRect) $__MonitorList[0][0] += 1 ReDim $__MonitorList[$__MonitorList[0][0] + 1][5] $__MonitorList[$__MonitorList[0][0]][0] = $hMonitor $__MonitorList[$__MonitorList[0][0]][1] = DllStructGetData($Rect, "left") $__MonitorList[$__MonitorList[0][0]][2] = DllStructGetData($Rect, "top") $__MonitorList[$__MonitorList[0][0]][3] = DllStructGetData($Rect, "right") $__MonitorList[$__MonitorList[0][0]][4] = DllStructGetData($Rect, "bottom") Return 1 ; Return 1 to continue enumeration EndFunc ;==>_MonitorEnumProc
×
×
  • Create New...