title image


Smiley Re: Bestimmte Word-Dateien drucken
Such dir eines aus:



Public Function WordDocDrucken(Optional FName As String = "I:\samples\testy.doc")

Dim WordObj As New Word.Application

With WordObj

.Documents.Open FileName:=FName, ReadOnly:=True

.PrintOut Background:=False

.Quit

End With

End Function





Public Declare Function ShellExecute 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 Const SW_HIDE = 0



Public Function DateiDrucken(FPath As String)

Dim Path As String, FName As String

Path = Left(FPath, InStrRev(FPath, "\"))

FName = Mid(FPath, InStrRev(FPath, "\") + 1)

ShellExecute Application.hWndAccessApp, "Print", FName, vbNullString, Path, SW_HIDE

End Function



Gruß aus dem Norden
Reinhard


Bitte immer die Access-Version angeben!
DB-Wiki


Wie man Fragen richtig stellt

YaccessAccess-FAQUnd ansonsten: Wikipedia




geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: