|
-
January 3rd, 2000, 12:02 AM
#1
VBA Printer change
I have seen some techniques for changing the default printer in visual basic. But how do you do this in Access Basic, where there is no printer object?
mindless in middletown
-
January 4th, 2000, 03:40 PM
#2
Re: VBA Printer change
I don't know if it's what you're looking for but that code makes you open the file menu in the menu bar and opens the printer box and after that well it's as usual.
Private Sub ImageImprimante_Click()
On Error GoTo Err_ImageImprimante_Click
DoCmd.DoMenuItem acFormBar, acrecordmenu, acSaveRecord, , acMenuVer70
Dim stDocName As String, Critere As Variant
Critere = Me![No_Appel]
stDocName = "E_NoAppel"
DoCmd.OpenReport stDocName, acViewPreview, [No_Appel], "[No_Appel] = " & Critere
'the next line is the one that opens the
'file menu to open the printer box the number 6
'is the row order for the printer in the file menu
DoCmd.DoMenuItem acFormBar, acFile, 6
Exit_ImageImprimante_Click:
Exit Sub
Err_ImageImprimante_Click:
MsgBox Err.Description
Resume Exit_ImageImprimante_Click
End Sub
hope this works and that's what you were looking for
nath 
-
January 5th, 2000, 12:11 AM
#3
Re: VBA Printer change
merci pour la reponse!
I ended up solving the problem using a WriteProfileString to change the default printer in the Win.ini
Thanks again!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|