Access - VBA - Ausdruck einer PDF Datei
Hallo Gemeinschaft,
möchte gerne per vba eine pdf Datei ausdrucken
habe in meiner db die vollständige Adresse zur pdf Datei hinterlegt und möchte diese per klick ausdrucken
könnt ihr da helfen
möchte gerne per vba eine pdf Datei ausdrucken
habe in meiner db die vollständige Adresse zur pdf Datei hinterlegt und möchte diese per klick ausdrucken
könnt ihr da helfen
Please also mark the comments that contributed to the solution of the article
Content-Key: 8630617063
Url: https://administrator.de/contentid/8630617063
Printed on: April 27, 2024 at 12:04 o'clock
5 Comments
Latest comment
Hallo,
https://learn.microsoft.com/de-de/office/vba/api/access.docmd.printout
https://learn.microsoft.com/de-de/office/vba/api/access.report.print
https://www.access-programmers.co.uk/forums/threads/vba-code-to-print-an ...
https://answers.microsoft.com/en-us/msoffice/forum/all/print-an-access-r ...
https://www.tek-tips.com/viewthread.cfm?qid=1400175
https://www.mrexcel.com/board/threads/print-an-external-file-from-access ...
usw
usw
usw
Gruß,
Peter
https://learn.microsoft.com/de-de/office/vba/api/access.docmd.printout
https://learn.microsoft.com/de-de/office/vba/api/access.report.print
https://www.access-programmers.co.uk/forums/threads/vba-code-to-print-an ...
https://answers.microsoft.com/en-us/msoffice/forum/all/print-an-access-r ...
https://www.tek-tips.com/viewthread.cfm?qid=1400175
https://www.mrexcel.com/board/threads/print-an-external-file-from-access ...
usw
usw
usw
Gruß,
Peter
Declare PtrSafe Function apiShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Sub PrintFile(ByVal strFile As String)
Dim inthWnd As Long
inthWnd = IIf(Application.Name = "Microsoft Access", hWndAccessApp, hwnd)
Call apiShellExecute(inthWnd, "print", strFile, vbNullString, vbNullString, 0)
End Sub
Sub Test()
PrintFile "C:\Test.pdf"
End Sub
Application.hWnd
war noch für eine andere Office-Anwendung, bitte ändern in Application.hWndAccessApp
Habe das oben etwas angepasst. Klappt hier dann problemlos.