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)
Global $sFile = "C:\temp\presentation.pptx"
Global $sString2Search = "<username>", $sString2Replace = "Password", $iReplaceOnce = 1, $sFullLogFile = "C:\temp\pptxlog.txt"
$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)
;it does not even open my file and from here not sure how to read the text and replace it