Consulting

Results 1 to 5 of 5

Thread: Word Macro Export PDF and lock some permissions (Mac)

  1. #1
    VBAX Regular
    Joined
    Nov 2020
    Posts
    15
    Location

    Question Word Macro Export PDF and lock some permissions (Mac)

    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
    Last edited by Aussiebear; 03-19-2024 at 04:26 PM. Reason: Added code tags to supplied code

  2. #2
    VBAX Contributor
    Joined
    Jul 2020
    Location
    Sun Prairie
    Posts
    126
    Location
    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.

  3. #3
    What I wanto 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.

  4. #4
    Quote Originally Posted by Chas Kenyon View Post
    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.
    Can you explain further?

  5. #5
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,232
    Location
    Quote Originally Posted by Mark M. Book View Post
    Can you explain further?
    Word does not give strong protection, so you will need to rely on other software as Chas has suggested.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •