Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-17-2014, 10:35 AM
rjrichar40 rjrichar40 is offline Export to PDF and also append additional Docs Windows 7 32bit Export to PDF and also append additional Docs Office 2010 32bit
Novice
Export to PDF and also append additional Docs
 
Join Date: Aug 2014
Posts: 11
rjrichar40 is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 09-17-2014, 10:42 PM
gmayor's Avatar
gmayor gmayor is offline Export to PDF and also append additional Docs Windows 7 64bit Export to PDF and also append additional Docs Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #3  
Old 09-18-2014, 06:49 AM
rjrichar40 rjrichar40 is offline Export to PDF and also append additional Docs Windows 7 32bit Export to PDF and also append additional Docs Office 2010 32bit
Novice
Export to PDF and also append additional Docs
 
Join Date: Aug 2014
Posts: 11
rjrichar40 is on a distinguished road
Default 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.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to export additional calendars supersadie Outlook 0 07-09-2014 06:22 AM
Export to PDF and also append additional Docs 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
Export to PDF and also append additional Docs Additional Markers in 2010(?) judicial85 Excel 5 09-26-2011 08:06 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:51 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft