• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

need help to create a macro for pdf printing

ANKUSHRS1

Member
Hi friends.

I am in business conference where I have received many orders from my clients in pdf formats. all I want to print all those files at once by using vba macro.
pls help me
 
Here is what I use. You would just have to modify it for your use. There is not much information listed. Is it excel or access? Most of the access code works in excel.
Code:
Private Sub Print_Current_Record_Click()
  Dim strWhere As String
    If Me.Dirty Then    'Save any edits.
        Me.Dirty = False
    End If
    If Me.NewRecord Then 'Check there is a record to print
    
        MsgBox "Select a record to print"
    Else
    Interaction.Beep
'Id = record number
        strWhere = "[ID] = " & Me.[ID]
        DoCmd.OpenReport "CURRENTLY SHOWN EMPLOYER_REPORT", acViewPreview, , strWhere
    End If
End Sub
 
I just warned your code can't work
as at least 6 words non existing under VBA for Excel ‼
If you just have try it you didn't ever post it.
And as all is yet in post #2 …
 
Marc L You are correct. I used access code & not excel. Here is the excel code, that I know works. I applolize to the community & the requestor.
Code:
Sub Print_Dialog_Box()
Dim bTemp As Boolean
'Calls the normal print window.
bTemp = Application.Dialogs(xlDialogPrint).Show
End Sub
 
Last edited by a moderator:

This new code serves to print the current worksheet
but it's not what asked the requestor …​
 
Back
Top