I hope this is the right place to post this.
I am a beginner with VB.Net and hope someone can help me with this question. Building a program in which I want to be able to access and print pre-existing text files (created with Wordpad). From the VB.Net books I have been reading, seems like the easiest way to do this is to use the "Process" component from the Components tab of the Toolbox. Indeed, I have been able to make my program open a blank Wordpad window, but unable to make it open or recognize my pre-existing files. I have ensured that my file pathways are correct, but keep getting an error message saying my file path is not recognized. I am attempting to print files from a Collection created by my program. Via debugging I have confirmed that the For Each...Next loop I am using to process the collection is working just fine. The code is like this:
Public PMHName As String
Public PMHFormsColl As New Collection
(then intervening code to assemble the collection, which consists of variables declared as strings and assigned specific file pathways)
I then use the Components tab to add a "Process" component to the form(which I name "mdprint")
For Each PMHName in PMHFormsColl
mdprint.Start()
Next PMHName
This opens a blank Wordpad window. If I make it
mdprint.Start(PMHName)
I get the error message.
Sorry for the long post. I am totally jammed on this, any help will be much appreciated! Thanks,
MRC
I am a beginner with VB.Net and hope someone can help me with this question. Building a program in which I want to be able to access and print pre-existing text files (created with Wordpad). From the VB.Net books I have been reading, seems like the easiest way to do this is to use the "Process" component from the Components tab of the Toolbox. Indeed, I have been able to make my program open a blank Wordpad window, but unable to make it open or recognize my pre-existing files. I have ensured that my file pathways are correct, but keep getting an error message saying my file path is not recognized. I am attempting to print files from a Collection created by my program. Via debugging I have confirmed that the For Each...Next loop I am using to process the collection is working just fine. The code is like this:
Public PMHName As String
Public PMHFormsColl As New Collection
(then intervening code to assemble the collection, which consists of variables declared as strings and assigned specific file pathways)
I then use the Components tab to add a "Process" component to the form(which I name "mdprint")
For Each PMHName in PMHFormsColl
mdprint.Start()
Next PMHName
This opens a blank Wordpad window. If I make it
mdprint.Start(PMHName)
I get the error message.
Sorry for the long post. I am totally jammed on this, any help will be much appreciated! Thanks,
MRC