Saving a PowerPoint Presentation as a pdf from With Outlook Code

I'm trying to write a macro in Outlook that will open a Powerpoint Presentation (that part works) then save it as a pdf.  The code I've seen does not seem to work when running the code from Outlook.  Here's what I've got so far, all the commented
lines are my attempts that are based on msdn code.
Sub PPD_PDF()
    Set powerpointapp = CreateObject("PowerPoint.application")
    powerpointapp.Presentations.Open "K:\PPD Minutes.pptx"
    'PowerPoint.ActivePresentation.ExportAsFixedFormat "C:\Users\rhammond\Documents\test.pdf", ppFixedFormatTypePDF, ppFixedFormatIntentScreen, msoCTrue, ppPrintHandoutHorizontalFirst, ppPrintOutputBuildSlides, msoFalse, , , , False, False,
False, False, False
    'ActivePresentation.ExportAsFixedFormat _
    '    FileName:= "C:\Users\rhammond\Dropbox\PPD\" & ActivePresentation.Name & ".pdf", _
    '    FixedFormatType:=ppFixedFormatTypePDF, _
    '    ppFixedFormatIntentPrint,
    'PowerPoint.Application.ActivePresentation.SaveCopyAs( _
    '    "C:\Users\rhammond\Dropbox\PPD\PPD Minutes.pdf", _
    '    ppSaveAsPDF)
End Sub

Would you not want to replace the PowerPoint variable with powerpointapp?
And prefix ActivePresentation with "powerpointapp."?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/redemption
Redemption - what the Outlook
Object Model should have been
Version 5.5 is now available!

Similar Messages

  • I recently purchased a MacBook Air and was told by Apple that Keynote and Pages were compatible with MS Applications.. I have since tried to open a Powerpoint Presentation but it comes up with an error message and is not right. Help!

    I recently purchased a MacBook Air and was told by Apple that Keynote and Pages were compatible with MS Applications.. I have since tried to open a Powerpoint Presentation but it comes up with an error message and is not right. Help!

    If there are fonts, transitions, builds, video or audio in the PowerPoint file that are not compatible with Keynote, it will either prevent the presentation opening or Keynote will substitute the settings causing playback changes.
    I use Open Office to play and open any PowerPoint files sent to me, they play exactly as in PowerPoint.
    Open Office is free, you can download it here:
    Open Office for Mac

  • Problem in printing pdf document with java code

    Hi All
    I want to print a pdf document with java code i have used PDFRenderer.jar to compile my code.
    Code:
    File f = new File("C:/Documents and Settings/123/Desktop/1241422767.pdf");
    FileInputStream fis = new FileInputStream(f);
    FileChannel fc = fis.getChannel();
    ByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
    PDFFile pdfFile = new PDFFile(bb); // Create PDF Print Page
    PDFPrintPage pages = new PDFPrintPage(pdfFile);
    // Create Print Job
    PrinterJob pjob = PrinterJob.getPrinterJob();
    PageFormat pf = PrinterJob.getPrinterJob().defaultPage();
    pjob.setJobName(f.getName());
    Book book = new Book();
    book.append(pages, pf, pdfFile.getNumPages());
    pjob.setPageable(book);
    // System.out.println(pjob.getPrintService());
    // Send print job to default printer
    pjob.print();
    but when i am running my program i am getting error
    Exception in thread "main" java.awt.print.PrinterException: Invalid name of PrintService.
    Please anybody, knows the solution for this error?
    Thanks In Advance
    Indira

    It seems that either there is no default printer setup or you have too many printers or no printer setup at all. Try running the following code. It should print the list of available print services.
    import java.awt.print.*;
    import javax.print.*;
    public class PrintServiceNames{
         public static void main(String args[]) throws Exception {
              PrintService[] printServices = PrinterJob.lookupPrintServices();
              int i;
              for (i = 0; i < printServices.length; i++) {
                   System.out.println("P: " + printServices);
    }From the list pick one of the print service names and set it explicitly like "printerJob.setPrintService(printServices);" and then try running the program.

  • Saving a powerpoint presentation with audio as a movie

    Hi there
    I'm stumped. have a powerpoint presentation with embedded audio and would like to save it as a movie for upload.
    any recommendations on how to do this?
    I tried the powerpoint 'save as movie' command but it didn't preserve the timings or audio.
    Thanks!

    Hi,
    If the PowerPoint presentation is self-running (you've set the presentation to use the timings you rehearsed), the only way I know of is to use video capture software. PowerPoint's export movie command seems more or less useless. One recommended by MacWorld is Snapz Pro X2 w/video capture. I've used it successfully to capture a 30 minute presentation complete with 44.1 hz/16 bit CD quality audio narration/score at 1200 x 900 resolution. This is on a Unibody MacBook Pro, which is rather impressive, given the computer is both playing the presentation and capturing both video and audio and saving to disk. However, there are other video capture apps that might also work, such as iShowU HD. I've only used Snapz Pro so far.

  • PDF report with bar code

    Hello.
    I am creating a PDF report using the Oracle Reports 6i running on Oracle Concurrent Manager.
    The PDF report has a bar code.
    The report finish with success but it is visualized without the bar code.
    Into the output report the bar code name is small font (mw6code39mt) always.
    I can visualize the output report when I manually alter the bar code name from small font to large font (MW6 Code39MT) only. I do it in my Unix server using the text editor.
    The bar code name installed in my PC is large font (MW6 Code39MT)
    I am experiencing problem when visualizing or printing the output report.
    Has somebody experience about it or some idea about how can I to configure the Unix server or Oracle to solve the problem?
    Thank you.
    Edson

    Hi Julie,
    Sorry my english.
    I will try to explain in more details the problem.
    I have identified that the bar code name into the PDF output is lowercase (mw6code39mt).
    I only visualize or print the PDF output with the bar code when I manually alter that bar code name from lowercase to uppercase (MW6Code39MT).
    I do that in my Unix server using the vi editor.
    Please, see what I need to alter in the PDF output file on Unix server:
    <</Type /Font
    /Name /F1
    /Subtype /Type1
    /Encoding /WinAnsiEncoding
    /BaseFont /mw6code39mt ====> alter to MW6Code39MT
    /FirstChar 24
    /LastChar 255
    /Widths 9 0 R
    /FontDescriptor 10 0 R
    >>
    endobj
    Thank you.
    Edson

  • How to set up a pdf embeded with different code so that people can get different excess code after they paid on-line?

    For example, I want to set up a pdf embeded with code, and send it on-line. People who want it should pay for it first and get the access code. I need to set different access code in order to avoid people A give the access to people B.

    Unless you use a very expensive DRM protection measure, I don't see how it's possible. How can you prevent someone from sending a file with the password to someone else?

  • Index failed for Docs and PDF files with return code 8002

    Hi All,
    I try to index Word documents in a webdav folder in KM. When I add a text document the Indexing completes correctly and I can find the document via the search. When I add a Word Document or PDF to the folder and reindex I get the message Index failed with return code 8002.
    How can I solve this Problem.
    Kind Regards,
    Richard Middelburg

    Hi,
    I have changed the host already from localhost into the hostname of the linux server. I tried this also with the FQDN of the server.  I have entered the following entry
    Hostname linux = sap12
    In the URL generator service = http://sap12
    Must I restart the portal?
    Richard

  • When converting a PowerPoint presentation to a PDF how do I attach the notes?

    I can convert the PowerPoint PDF but the notes are not attached.  What should I do?

    Hi Annie + 13,
    This can not be accomplished through Create PDF but through Acrobat you can add notes.
    Take a look at this screenshot.
    Make sure you have selected the 'Convert Speaker Notes' option.
    Regards,
    Florence

  • My Powerpoint presentation is out of sync with my Captivate 5.5 project

    I need to edit the Powerpoint and resync to Captivate without disrupting existing audio, etc.  How do I do this?

    Welcome to the Apple Community.
    It sounds as though you may have exceeded some of the limits of Address Book in iCloud.
    Total number of contact cards: 25,000
    Maximum size of a contact card: 256 KBMaximum size of a contact photo: 224 KB
    Maximum size of a contact group: 256 KB
    Maximum size of all contact cards:
    Card text: 24 MB
    Card photos: 100 MB
    Supported file types for a contact photo: JPEG, JPG, BMP, PNG, GIF

  • How to display pdf file with java code?

    Hi All,
    i have a jsp pagein that page if i click one icon then my backing bean method will call and that method will create pdf document and write some the content in that file and now i want to display that generated pdf document.
    it should look like you have pressed one icon and it displayed pdf file to you to view.
    java code below:
    FacesContext fc = FacesContext.getCurrentInstance();
    ExternalContext ec = fc.getExternalContext();
    HttpServletResponse resp = (HttpServletResponse) ec.getResponse();
    resp.setHeader("Content-Disposition", "filename=\"" + temppdfFile);
    resp.encodeRedirectURL(temppdfFile.getAbsolutePath());
    resp.setContentType("application/pdf");
    ServletOutputStream out = resp.getOutputStream();
    ServletUtils.returnFile(temppdfFile, out);
    out.flush();
    and above temppdfFile is my generated pdf file.
    when i am executing this code, it was opening dialog box for save and cancel for the file, but the name of the file it was showing me the "jsp file name" with no file extention (in wich jsp file i am calling my backing bean method) and type is "Unknown File type" and from is "local host"
    it was not showing me open option so i am saving that file then that file saved as a pdffile with tha name of my jsp file and there is nothing in that file(i.e. empty file).
    what is the solution for this. there is any wrong in my code.
    Please suggest me.
    Thanks in advance
    Indira

    public Object buildBarCodes() throws Exception
    File bulkBarcodes = null;
    String tempPDFFile = this.makeTempDir();
    File tempDir = new File("BulkPDF_Files_Print");
    if(!tempDir.exists())
    tempDir.mkdir();
    bulkBarcodes = File.createTempFile
    (tempPDFFile, ".pdf", tempDir);
    //bulkBarcodes = new File(tempDir, tempPDFFile+"BulkBarcode"+"."+"pdf");
    if(!bulkBarcodes.exists())
    bulkBarcodes.createNewFile();
    Document document = new Document();
    FileOutputStream combinedOutput = new FileOutputStream(bulkBarcodes);
    PdfWriter.getInstance(document, combinedOutput);
    document.open();
    document.add(new Paragraph("\n"));
    document.add(new Paragraph("\n"));
    Image image = Image.getInstance(bc.generateBarcodeBytes(bc.getBarcode()));
    document.add(image);
    combinedOutput.flush();
    document.close();
    combinedOutput.close();
    FacesContext facesc = FacesContext.getCurrentInstance();
    ExternalContext ec = facesc.getExternalContext();
    HttpServletResponse resp = (HttpServletResponse) ec.getResponse();
    resp.setHeader("Content-Disposition", "inline: BulkBarcodes.pdf");
    resp.encodeRedirectURL(bulkBarcodes.getAbsolutePath());
    resp.setContentType("application/pdf");
    resp.setBufferSize(10000000);
    ServletOutputStream out = resp.getOutputStream();
    ServletUtils.returnFile(bulkBarcodes, out);
    out.flush();
    return "success";
    This is my action method which will call when ever i press a button in my jsp page.
    This method will create the barcode for the given barcode number and write that barcode image in pdf file
    (i saw that pdf file which i have created through my above method, This PDF file opening when i was opening manually and the data init that is also correct means successfully it writes the mage of that barcode)
    This method taking the jsp file to open because as earlier i said it was trying to open unknown file type document and i saved that file and opended with editplus and that was the jsp file in which file i am calling my action method I mean to say it was not taking the pdf file which i have created above it was taking the jsp file

  • Opening and populating a PDF form with VBA code in Access 2007

    I had posted this in Acrobat Windows.  It was suggested this (and the SDK forum) may be a better forum ...
    I'm trying to load and then populate a PDF form programmatically using Access/VBA.  I'm patterning this after code that worked fine in Acrobat 5.0 but is throwing errors in Acrobat 9.  We're using Access 2007 on Windows XP and Vista computers.
    The Access project has a reference to Adobe Acrobat 9.0 Type Library.  Attached is a jpg showing all the references in the Access project.
    The error "Object variable not set (Error 91)" is happening with this statement:
    Set PDDoc = AVDoc.GetPDDoc
    Here is the code I'm trying to use.  I've always been a little fuzzy exactly which objects need to be created and the sequence they need to be created in.  Once I got it working in Acrobat 5 I left it alone.
        Dim WshShell As Object
        Dim myApp As Acrobat.AcroApp
        Dim AVDoc As Acrobat.AcroAVDoc
        Dim PDDoc As Acrobat.AcroPDDoc
        Dim PauseTime, Start
        Set WshShell = CreateObject("Wscript.Shell")
        ' run the Acrobat application within that shell and pass it a document name
        WshShell.Run "Acrobat.exe C:\Users\Christian\Documents\data\dist5\dist05_face_only_nh.pdf"
        '// Set/Get Acrobat Objects
        ' create an automation object that references the active copy of Acrobat
        Set myApp = CreateObject("AcroExch.App")
        ' reference the acrobat document we loaded above
        'Set AVDoc = CreateObject("AcroExch.AVDoc")
        Set AVDoc = myApp.GetActiveDoc()
        ' this apparently runs some method available to AVDOC
        Set PDDoc = AVDoc.GetPDDoc      '<------------------ THIS IS THE LINE THROWING THE ERROR
        ' this is how you reference the JSObject
        Set jso = PDDoc.GetJSObject
        ' let's clear the form
        temp = jso.resetForm()
        Set x = jso.getField("txt1_name")
        x.Value = "Bing Crosby"
        Set x = jso.getField("txt2_sex")
        x.Value = "Male"
        Set WshShell = Nothing
        Set myApp = Nothing
        Set AVDoc = Nothing
        Set PDDoc = Nothing
    Thanks in advance for any help.
    Christian Bahnsen

    Using the "Developing Applications Using Interapplication Communication" reference, I've been filling in knowledge gaps and baby-stepping until I hit this major wall.  FYI:  from page 22 in the reference
    Example 2.6 Displaying “Hello, Acrobat!” in the JavaScript console will not work as shown in Access VBA.  I've tried the example in both Access 2003 and 2007.  The sample code as is throws error 91 (see attachment error91.jpg), "Object variable ... not set".
    I add Set to the following 3 lines:
        Set gApp = CreateObject("AcroExch.App")
        Set gPDDoc = CreateObject("AcroExch.PDDoc")
        Set jso = gPDDoc.GetJSObject
    Running the code after adding "Set" doesn't throw an error but it does crash Access every time.  (see attachment error_reporting.jpg)
    Any suggestions?
    Here's the entire code snippet:
    Private Sub cmdHelloAcrobat_Click()
        Dim gApp As Acrobat.CAcroApp
        Dim gPDDoc As Acrobat.CAcroPDDoc
        Dim jso As Object
        Set gApp = CreateObject("AcroExch.App")
        Set gPDDoc = CreateObject("AcroExch.PDDoc")
        If gPDDoc.Open("C:\chris\acrobat_test.pdf") Then
            Set jso = gPDDoc.GetJSObject
            jso.console.Show
            jso.console.Clear
            jso.console.println ("Hello, Acrobat!")
            gApp.Show
        End If
    End Sub

  • PDF Sending with Outlook

    Hello Community,
    I just made a PDF form on Adobe Acrobat XI Pro (trial version).
    In the last 3 textboxes, people can fill their e-mail.
    I want to make a interactive button with when you click it, outlook opens and the 3 mailadresses are there.
    Is this possible and if yes, please tell me how.
    I'm not that good in Acrobat, so dont make it to complicated.
    Greetings!

    Yes, it is possible. See this tutorial: https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address

  • Error message when trying to convert powerpoint presentation to Adobe Acrobat PDF

    When trying to create an Adobe Acrobat PDF file from Powerpoint (save as Adobe PDF from the Print menu), Automator gives the following error message: "an error occurred while saving the PDF file". Currently using version 14.4.6 of Microsoft Powerpoint for Mac, 11.0.09 Adobe Acrobat and OS X Yosemite 10.10.1 on iMac. Also had the same problem previously with Mavericks and Mountain Lion. The problem seems to be the Apple Automator not working correctly with the Acrobat interface. I create Acrobat PDF docs perfectly well on my MacBook Pro (OS X 10.7.5) and am scared to update to the latest version of OS X in case that also affects the ability to create PDFs.
    I have tried using Apple's own PDF creator, and doing this by first creating PS files then converting to PDF, however, many bugs appear in the files, and they are enormous - around 5x the size of Acrobat PDFs, so this is not an option. I have also tried troubleshooting with Adobe to no avail.
    Can anyone help?
    Thanks,
    Jane

    Hi star2111,
    Please tell us a bit more about the error message that you're receiving, and where you're seeing it (in Adobe Reader, or the ExportPDF website?). It will also be helpful to know whether the error occur when just one file, or with any file that you try to convert.
    I look forward to hearing back from you.
    Best,
    Sara

  • Problems saving to pdf files with adobe acrobat on imac

    I have just installed and activated Adobe Acrobat 9.0 on my new iMac OS X 10.8.2, but it keeps coming up with an error message when trying to save a powerpoint presentation to a pdf file. I have downloaded all updates, painfully, one by one, from 9.1 to 9.5.3, but still to no avail. Any suggestions to get Acrobat up and running. Unfortunately, customer support from Adobe a big fat zero.

    Are you trying to view PDF forms?  If so then you may want to use Adobe Reader.  You can find the download for Adobe Reader at http://get.adobe.com/reader/.

  • Can't create PDF from MS word 2007 Doc

    I am using CS3 Acrobat Pro 8.2 and I can't get a Word doc to PDF.  It starts but then just stops at about 10%.  I have tried importing from Acrobat and just get an error message stating "An unexpected error occurred. PDFMaker was unable to produce the Adobe PDF."
    Anyone have any ideas as to what may be the problem?

    Bill, when using Word or any other MS office app, the process begins the conversion then just stops about 10-15% of the way and the process window disappears.  No error message, nothing.  It just stops.  Now, I can save items as a "Quick and Simple PDF" but not as a "Fully functional PDF" when saving from Word.  So I have narrowed it down that far.  The screen shot below was created in Word and saved as a Quick and Simple PDF from Word.
    When trying to use the Create PDF function from AA, I get an unexpected error message.

Maybe you are looking for