1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Dim Mode As Integer
Dim rep As Integer
Dim Wp As String
Dim Monetat As New Access.Application
Dim nbcaractere As Integer
Dim winreg As New WinRegPath
Dim StrCmd As String
Dim accesspath As String
'Lance l'impression
rep = MsgBox("Voulez-vous un apperçu ?", vbYesNoCancel + vbExclamation, "Impression")
If rep <> vbCancel Then
etat = 'NOM DE TON ETAT ACCESS
Mode = IIf(rep = vbYes, acViewPreview, acViewNormal)
Wp = 'TA REQUERE
winreg.Load HKEY_LOCAL_MACHINE, StrOfficeReg
StrCmd = " /Cmd """ & etat & "|" & Wp & "|" & Mode & """"
accesspath = NoZ(winreg.GetAttributValue("Path", ""), "") & "MSACCESS.EXE " & StrDbReport & StrCmd
appid = Shell(accesspath, vbMinimizedFocus)
apphandle = OpenProcess(&H400&, False, appid&)
End If |
Partager