osx - VBA - Export individual PowerPoint slides into PDF files, named by content field -


i have 15 different slide decks, contain 3-4 slides each. each deck comprised of "certificates" broken out , given each individual recipient, named on certificate. process repeated every month.

ideally, enable vba script extract each sheet save (or print as) pdf, , save file name of recipient named on slide... possible?

the best have found code, (which doesn't work on mac, works fine on vm) separate slides pdf's, naming changed.

any appreciated!!

sub exportslidestoindividualpdf() dim oppt presentation, oslide slide dim spath string, sext string  set oppt = activepresentation spath = oppt.fullname & "_slide_" sext = ".pdf"  each oslide in oppt.slides     = oslide.slidenumber     oslide.select     oppt.exportasfixedformat _         path:=spath & & sext, _         fixedformattype:=ppfixedformattypepdf, _         rangetype:=ppprintselection next set oppt = nothing end sub 

edit further clarification:

i'm forced run script in windows virtual machine, , when that, i'm losing of formatting set in slides, created in office '11 (which 1 of big reasons export pdf in first place).

a little more project:
1. compiling couple thousand lines of "actions" (data), determine winner recognition award, based on criteria 4 different award categories, 12-15 different executives.
2. results tallied, retrieve winners information (name, id, , same manager , executive) ldap directory. put csv mail-merge @ later step.
3. template slide deck used slides, (12-15 executives have 3-4 winners each).
4. individual pdf certificates created slides.
5. congratulatory message drafted, fields pulled prepared csv mail-merge, , exported outlook 2011 outbox (client offline).
6. attach each individual certificate each message manually in outbox.
7. send.

i have compiled sample set of files linked here: recognition files (sample)

on each slide there 1 or several shapes. sake of illustration, assume recipient's name in first shape.

sub exportslidestoindividualpdf() dim oppt presentation, oslide slide dim spath string, sext string  set oppt = activepresentation  sext = ".pdf"  each oslide in oppt.slides     '## retrieve recipient's name shape , append exported path:     spath = oppt.fullname & oslide.shapes(1).textframe.textrange.text     = oslide.slidenumber     oslide.select     oppt.exportasfixedformat _         path:=spath & sext, _         fixedformattype:=ppfixedformattypepdf, _         rangetype:=ppprintselection next set oppt = nothing end sub 

it may more complicated, depending on how slides configured (e.g., if there shape contains name and other text, need function parse out proper name , omit rest, etc.

provide more detail, problem if need further assistance.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -