![]() |
|
#1
|
|||
|
|||
|
Hi Experts,
Here are below codes for converting the the file from excel to pdf with the required name of the file. Can you please provide the macro with the present macro for protecting the pdf after conversion from editing in any manner. Private Sub CommandButton2_Click() 'saves the file as PDF and adds a date parameter to the name of the file aux1 = "" If Month(Date) < 10 Then aux1 = "0" End If aux2 = "" If Day(Date) < 10 Then aux2 = "0" End If fileN = "Salary Slip of " & Workbooks.Application.Sheets("Salary Slip").Cells(10, 5).Value fileD = Format(Sheets("Salary Slip").Cells(6, 2).Value, "mmm-yy") ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=ThisWorkbook.Path & "\" & fileN & " for " & fileD & ".pdf", _ Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _ :=False, OpenAfterPublish:=True End Sub Please help me out experts. Regards, Neilesh |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
f2 function in excel 2013 for editing/viewing
|
msnarayanan | Excel | 1 | 08-03-2015 02:41 AM |
Can I encrypt a document in Word Starter 2010?
|
chicken legs | Word | 2 | 03-03-2013 01:59 PM |
| Excel / Access 2010 Time field conversion | djsn | Excel | 0 | 05-24-2012 09:55 AM |
Need help editing a .PDF to .DOC conversion
|
Bobosmite | Word | 1 | 05-06-2011 05:18 AM |
| Encrypt outlook folders | whatever61 | Outlook | 4 | 12-21-2010 05:26 PM |