title image


Smiley Text aus Memofeld per Notepad drucken.
Na, ganz einfach:



Shell "Notepad.exe ""c:\wo auch immer\Deinedatei.txt"""





Aber dies hier ist wohl besser:



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 strDrucken(S As String)

Dim Chan As Long, Path As String, FName As String

Path = Environ("TEMP")

If Path = "" Then Path = Environ("TMP")

If Path = "" Then Path = "C:\Temp"

If Right(Path, 1) "\" Then Path = Path & "\"

FName = "Tmp_" & Format(Now, "yyyymmddhhnnss") & ".txt"

Chan = FreeFile()

Open Path & FName For Output As #Chan

Print #Chan, S

Close #Chan

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: