I have a text file named Inventory.txt, and i'm trying to send the file to the printer. How can i do this in code with VBA. For some reason the Printer.print command is giving me "Object doesn't support this property or method" along with Printer.EndDoc and ?Printer.NewPage?
I saw these methods on the site and tried them but with Access 2003, none of them are available. Thank you in advance for any help you can offer.
I haven't tried using any of the commands you're mentioning, but I think this should be possible using the ShellExecute API.
Place the following in the declaration section of a module (at the top) if you place it in a standard module, change Private to Public:
Private Declare Function apiShellExecute 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) _
Then in the routine where you need to print, call it with: