borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Print from WebBrowser in Form - How???)Next Topic (Printing from a text box) New Topic New Poll Post Reply
AndreaVB Forum : Printing : print text file
Poster Message
mlane
Level: Guest


icon print text file  Archived to Disk

I am a little confused with your code it works fine but as soon as I modified it a little it tells me for - PrintTXTFile - arguement not optiona -
I am not sure what to do to get this to work now. because I am trying to print a bunch of text files off one at a time by pressing this print button. Can u help me?

this is the code excluding the module(which works fine)

Private Sub Command1_Click()
    Dim ofolder As Folder
    
    Dim ofso As New FileSystemObject
    Dim Item As Collection
    Set ofolder = ofso.GetFolder("C:documents and settingsmlanedesktop")
            'MsgBox "whatever" + (ofolder.Files.Count)
    'Set ofso = ofolder.Files
    For Each Item In ofolder.Files
            
        
        If Item.Name = "C:documents and settingsmlanedesktopnew text document.txt" Like "C:documents and settingsmlanedesktop*.txt" Then

          
            PrintTXTFile = ("C:documents and settingsmlanedesktopnew text document.txt")
        End If
    
        
    Next
  
End Sub

Thank you,
Mark Lane
mlane@emcare.com

[Edited by admin on 05-07-2002 at 07:22 AM GMT]

03-06-2002 at 01:01 PM
| Quote Reply
AndreaVB Forum : Printing : print text file
Previous Topic (Print from WebBrowser in Form - How???)Next Topic (Printing from a text box) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder