HansV. 1) Word 2013 and later can open PDF files. So you could automate Word from Excel, and use it to open the PDF file, read its contents, then close it. Then use the information from the file to rename it. 2) If you have Adobe Acrobat, you can set a reference in Tools > References to the Acrobat type library. This video shows how to programatically read\write to a PDF file using Microsoft Excel 2010/2007 using PDF API. Using Excel, you can read\write to PDF fields Browse: Home / Excel VBA macro to print your file to PDF.. For 2007 and up: In excel 2007 there is a built-in option: File / Save & Send / Create PDF & XPS Document. The macro below does that for you, faster and easier. Assign it to a button and change the sheets array and references to ActiveSheet to have a standardized button. I use this to Save and Email PDF Function. This function will save the ActiveSheet as a PDF and (optionally) attach the PDF to an email (assuming you have Outlook installed): Sub Test_Save_PDF() Call Send_PDF("SendEmail") End Sub. Function Send_PDF(Optional action As String = "SaveOnly") As Boolean ' Copies sheets into new PDF file for e-mailing. Save active sheet as PDF. The following code saves the selected sheets as a single PDF. Sub SaveActiveSheetsAsPDF () 'Create and assign variables Dim saveLocation As String saveLocation = "C:UsersmarksOneDriveDocumentsmyPDFFile.pdf" 'Save Active Sheet (s) as PDF ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _ Filename:=saveLocation End Sub. A simple Google search like "Best Free Online PDF Editors" should do the trick. This search will produce a ton of options like PDF Elements, PDF Expert for Mac or the free online tool, PDF Escape. My current favorite tool to edit a PDF is the Sejda Online PDF Editor (pronounced "say-duh"). This is one of the very few free PDF editors The code is written to save your PDF in the same folder as the Word Document file currently resides. If you need to make modifications, hopefully, you will be able to follow along with my code comments and customize the code to your specific needs. Sub Word_ExportPDF () 'PURPOSE: Generate A PDF Document From Current Word Document. I am using acrobat pro 11 to convert a word doc to pdf using vba in word 2013. I need to know how to change the security setting within vba to restrict editing of the pdf doc. Thanks. Here's my code : Sub Créer_PDF() Here is some code that you have probably seen. You have to change the pdf filename and the ThisWorkbook.Path if that is not the path to the pdf file. Otherwise, it does a nice job showing your field information less the values in the Immediate window after a run. Enable it in the VBE View menu if not active. Code: Ribbon >> Insert >> Text >> Object >> Create from file >> check/select Display as icon >> click Change icon. There you'll find the filename you'll need to reference, and you'll be able to see the different icons available. Note that the index for these icons are 0-based. Code: SaveAs. This Word macro will save the ActiveDocument with a new file name that includes the current time: Sub SaveMewithDateName () 'saves active doc in current folder as a filtered html and named upon current time Dim strTime As String strTime = Format ( Now, "hh-mm") ActiveDocument. SaveAs FileName:= ActiveDocument. Adobe Acrobat Library - Early bound. To create the Vb Reference to the Adobe Library in the VBA Editor menu click Tools `References then select the Adobe Acrobat Library in the dialog window then press the
© 2025 Created by XLFD. Powered by
You need to be a member of The Ludington Torch to add comments!
Join The Ludington Torch