Hi
I have the below vba code to save as PDF. I need to protect PDF with permission for Printing.
But no text copying to be permitted.
Sample Password for PDF is 'mypassword'.
Request your help.
I have the below vba code to save as PDF. I need to protect PDF with permission for Printing.
But no text copying to be permitted.
Sample Password for PDF is 'mypassword'.
Request your help.
Code:
Sub PDF_Mail()' PDF Macro - Works in Excel 2007, when SaveasPDF Addin is Installed'
Dim rRng As String
Dim i As Integer
i = 4
Do While i < 100000
rRng = "A" & i
Sheets("PrintList").Select
Range(rRng).Select
Selection.Copy
If ActiveCell.Value <> "" Then
Sheets("Receipt").Select
Range("D10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="D:\ThatsMyChild\" & Range("AD4")
FName = "D:\ThatsMyChild\" & Range("AD4") & ".pdf"
Call receipt_mail
Sheets("receipt").Select
Else
Exit Sub
End If
i = i + 1
Loop
End Sub