18/11/2005, 08h06
|
#2 (permalink)
|
|
XLDnaute Barbatruc
Date d'inscription: février 2005
Messages: 3 816
|
Re:Imprimer Userform en mode paysage
bonjour
tu peux tester
Private Declare Sub keybd_event Lib 'user32' ( _
ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)
Private Sub CommandButton1_Click()
Dim Wrd As Object
Dim WrdDoc As Object
keybd_event vbKeySnapshot, 1, 0&, 0&
DoEvents
Set Wrd = CreateObject('Word.Application')
On Error Resume Next
Set WrdDoc = Wrd.Documents.Add
Wrd.Visible = False
WrdDoc.PageSetup.Orientation = wdOrientLandscape
Wrd.Selection.PasteSpecial
WrdDoc.PrintOut
WrdDoc.Close False
WrdDoc.Quit
End Sub
bonne journée
MichelXld
|
|
|