This should get you started. Note the code assumes you have a default printer for the computer and you will need to change the path for NotePad as well as the text file. Let me know if this helps.
Drop this code in a command button click event
Private Sub Command1_Click()
Dim iFF As Long
Dim ans As VbMsgBoxResult
Dim strData As String
iFF = FreeFile
Open "C:\TestTextFile.txt" For Append As #iFF 'Write to a text file
Print #iFF, "First Line"
Print #iFF, "Second Line"
Print #iFF, "Third Line"
Close #iFF
ans = MsgBox("Do you wish to print?", vbYesNo, "Choose an Option"

If ans = vbYes Then 'Print
Open "C:\TestTextFile.txt" For Input Access Read As #iFF
Do While Not EOF(iFF)
Input #iFF, strData
Printer.Print strData
Loop
Close #iFF
Else 'Open NotePad
Shell "E:\WINNT\system32\notepad.exe C:\TestTextFile.txt", vbNormalFocus
End If
End Sub
If you choose to battle wits with the witless be prepared to lose.
![[machinegun] [machinegun] [machinegun]](/data/assets/smilies/machinegun.gif)
![[hammer] [hammer] [hammer]](/data/assets/smilies/hammer.gif)