PDA

View Full Version : Word Macro Export PDF and lock some permissions (Mac)



AshZM
03-19-2024, 02:58 PM
Hi,

I have had a recent problem with people opening my pdf files and editing them. Obviously, I don't want my signature on an altered report!

I love my macro to export to pdf. But, I want to change a few permissions. I do not want to add an extra step of opening the file to lock a few permissions, if possible.

From what I've read, this is not possible with VBA in Word. But, I've seen magic happen here... Maybe there is a pdf macro library, AppleScript or Command line would work? Keyboard Maestro with Witch?

What I want:
Do not allow text editing.
Do not allow adding/deleting pages.

I do want them to be able to print.
I do want them to be able to copy.
I do want them to open the document without a password.



I know there are plenty of workarounds for users, but I'd like to at least make it harder for the average person.

Here is my pdf export Macro.


Public Sub Save_as_PDF()
Dim saveName As String
saveName = ActiveDocument.FullName
saveName = Left(saveName, Len(saveName) - 5) & ".pdf"
ActiveDocument.SaveAs FileName:=saveName, _
FileFormat:=wdFormatPDF
End Sub


I don't even know where to start to show that I've worked on this, other than sending you my Chrome history ;-). Plus, I can't afford to go down the (ADHD) rabbit hole - I need to write. Hopefully someone can help!

Thank you in advance,
-Ashley
Phoenix, Arizona

Chas Kenyon
03-26-2024, 12:00 PM
While I hope someone else can help you, as a fellow-traveller ADHD person, my advice is to lock them using Acrobat or another pdf editor.
Perhaps a macro solution will come, but don't hold your breath.

arnelgp
03-26-2024, 07:47 PM
What I want:Do not allow text editing.
Do not allow adding/deleting pages.

I do want them to be able to print.
I do want them to be able to copy.
I do want them to open the document without a password.
don't give them the word document.