#1
|
|||
|
|||
Export to PDF and also append additional Docs
Howdy folks,
I have some code to create a PDF from a word doc. Pretty easy stuff. The problems I am running into are: 1) how can I append additional Word doc files to an existing PDF? Or, have several Docs selected, and merge them into one PDF? 2) in VBA, can I assign permissions such as Read-Only and text not allowed to be copied? The code I have tried so far is below, but I don't see options for the above. Any thoughts are welcome! (I should add that I can't use 3rd party software for this... just Word 2010 and inherent PDF ability). 2 variations of the same thing, basically: WdDoc.ExportAsFixedFormat OutputFileName:=StrFilePath, ExportFormat:=wdExportFormatPDF, OpenAfterExport:=True, OptimizeFor:=wdExportOptimizeForPrint, Range:=wdExportAllDocument, Item:=wdExportDocumentContent, IncludeDocProps:=True ActiveDocument.SaveAs2 Replace(ActiveDocument.FullName, ActiveDocument.Name, "") + Mid(ActiveDocument.Name, 1, InStr(1, ActiveDocument.Name, ".") - 1) + ".pdf", Word.WdSaveFormat.wdFormatPDF |
#2
|
||||
|
||||
The Office built-in PDF function is quite rudimentary and does not offer the option to append files. You can't do this without third party software.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
doing a workaround
I think my only choice is to merge the Doc files first, then export to PDF. Not ideal, but my only option.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to export additional calendars | supersadie | Outlook | 0 | 07-09-2014 06:22 AM |
How to append specific *.tif image with another tif file through Word VBA | aarun2 | Word VBA | 1 | 04-08-2014 03:20 PM |
Append text to a sentence containing specific word | dgp | Word VBA | 3 | 02-28-2014 10:38 PM |
Append text to a cell with color | gvdm | Excel | 1 | 04-17-2012 10:21 AM |
Additional Markers in 2010(?) | judicial85 | Excel | 5 | 09-26-2011 08:06 AM |