Jump to content

Ramses

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Ramses

  1. That's what I did. Further searches didn't provide any better results. err.number is: 80020005 err.windescription: Typkonflikt. (type mismatch) err.description is: err.source is: err.helpfile is: err.helpcontext is: 18055848 err.lastdllerror is: 0 err.scriptline is: 24 err.retcode is: 0
  2. I am sorry for not getting back to you earlier ... Yes, I have the full office suite installed. Some more information: Sub exportme() ActivePresentation.ExportAsFixedFormat ActivePresentation.Path & "\" & ActivePresentation.Name & ".pdf", ppFixedFormatTypePDF End Sub The above is a VBA macro that runs fine from within Powerpoint. PpFixedFormatTypePDF is of type PpFixedFormatType AutoIT is throwing a type mismatch error when I make the call - it seems something somewhere is not happy with my passing of ppFixedFormatTypePDF - which I have done as "ppFixedFormatTypePDF", 2, "2", as a constant and variable as well. Anyway, I mostly just wanted to thank you for your efforts, albeit I am very late doing so. I think I can work around the actual problem by calling a macro...
  3. Oh cool. I was trying to dig through the MS navigation and hit a dead end. Doesn't change anythng, though. The docs haven't changed, and it's still not working. I can't even get the supplued VBA example to work. http://msdn.microsoft.com/en-us/library/ff746080%28v=office.14%29.aspx VBA throws a runtime error that leads me here: http://support.microsoft.com/kb/285472/en-us Can't figure that out, either ...
  4. I tried that, too. Same result. I don't know what it *should* be - I have tried everything I think it *should* be and a good few things that I don't think it should be, too. So, the reference for 2007 (http://msdn.microsoft.com/en-us/library/bb231096%28v=office.12%29.aspx ) and the one for 2013 (http://msdn.microsoft.com/de-de/library/office/ff746080.aspx) both seem to agree that this command exists. I can't even find the docs for 2010.
  5. Sure. By now I was just expecting my error to be glaringly obvious to the initiated.... See ...\test.au3 (41) : ==> The requested action with this object has failed.: $word.ExportAsFixedFormat ("c:\present.pdf", 2) $word.ExportAsFixedFormat ("c:\present.pdf", 2)^ ERROR ->18:06:54 AutoIt3.exe ended.rc:1 Now, I *know* I am getting the Object assigned to $word - I can close the presentation and the application with $word.activepresentation.close $word.Quit I have tried to use the export function on the application rather than the presentation - but that didn't help. Also, the parameter 2 I am passing here should indicate PDF format. "pdf" and "ppFixedFormatTypePDF" didn't seem to help, either.
  6. Hi, this should be easy and it should be working. I have to check a number of Powerpoint Files and assign a password (if they don't have one yet) and export the file to a pdf (if it doesn't exist yet.) $FilePath and $FileName are defined elsewhere; you just need to point them at something like $FilePath = "c:presentation.ppt" $FileName = "presentation.ppt" The script opens the file, waits for it to either open or request a password (covers for German and English installations - I know it's not pretty.) If a password is requested, it is supplied here. I am then trying to export the file to pdf, and this keeps failing. I have no idea what else I should be expected to do here. any pointer or suggestions? This is for autoit v3.3.8.1, Microsoft Office 2010 and Windows 7 (Enterprise) ShellExecute($FilePath) Do until WinExists("Kennwort") ; we have opened the file. At this stage, there should be a full window, or a password prompt. If the latter, we'll supple the password and wait if WinExists("Kennwort") then WinActivate ("Kennwort") ControlSetText ("Kennwort", "", 6, "Password") ControlClick ("Kennwort", "", 1) EndIf if WinExists("Kennwort") then WinActivate ("Kennwort") ControlSetText ("Kennwort", "", 6, "Password") ControlClick ("Kennwort", "", 1) EndIf Do until WinExists($FileName) sleep (10000) WinActivate ($FileName) $word = Objget("", "PowerPoint.Application") $word.activepresentation.ExportAsFixedFormat ($FilePath & ".pdf", 2) $word.activepresentation.close $word.Quit
×
×
  • Create New...