I have written a small VB program which lists my music files on my computer,
but I
can't get it to print exactly the way I want it to. The data is viewed on
screen in
an MSFlexGrid named "TextGrid" and the following code will send it to a
printer, but I was hoping to be able to send it to either a text file or
directly to a Word for Windows file.
Private Sub Command34_Click ()
Dim X%
For X% = 0 To TextGrid.Rows - 1
TextGrid.Row = X%
TextGrid.Col = 0
Printer.Print , TextGrid.Text;
TextGrid.Col = TextGrid.Col + 1
Printer.Print , TextGrid.Text
Next X%
End Sub
One problem with the method shown above is that the song titles are not
always correctly aligned. But I would like to be able to include some other
formatting as well, so it would be easiest to send it directly to either a
text file (which I could pick up in Word) or to a Word file.
Can anyone give me a clue as to how I go about this?
Phil Benson 7 5710
On Fri, 25 Jun 2004 13:44:23 GMT, "MouseHart" <Mo*******@trap .net>
wrote: I have written a small VB program which lists my music files on my computer, but I can't get it to print exactly the way I want it to. The data is viewed on screen in an MSFlexGrid named "TextGrid" and the following code will send it to a printer, but I was hoping to be able to send it to either a text file or directly to a Word for Windows file.
Private Sub Command34_Click () Dim X%
For X% = 0 To TextGrid.Rows - 1 TextGrid.Row = X% TextGrid.Col = 0 Printer.Print , TextGrid.Text; TextGrid.Col = TextGrid.Col + 1 Printer.Print , TextGrid.Text Next X%
End Sub
One problem with the method shown above is that the song titles are not always correctly aligned. But I would like to be able to include some other formatting as well, so it would be easiest to send it directly to either a text file (which I could pick up in Word) or to a Word file. Can anyone give me a clue as to how I go about this?
It would be more sensible to send it to the Printer
- since that is where you want it to go in the end
You are missing positioning the fields
Printer.Current X = ....
Although the ultimate destination may be the printer, I still wonder if
there is a way to send it to a file. That information would be useful to me
for future reference, in case I wanted to export the data instead of print
it. I will take your advice on positioning the fields, though. I was not
aware of that command. Thanks.
"J French" <er*****@nowher e.com> wrote in message
news:40******** *******@news.bt click.com... On Fri, 25 Jun 2004 13:44:23 GMT, "MouseHart" <Mo*******@trap .net> wrote:
I have written a small VB program which lists my music files on my
computer,but I can't get it to print exactly the way I want it to. The data is viewed
onscreen in an MSFlexGrid named "TextGrid" and the following code will send it to a printer, but I was hoping to be able to send it to either a text file or directly to a Word for Windows file.
Private Sub Command34_Click () Dim X%
For X% = 0 To TextGrid.Rows - 1 TextGrid.Row = X% TextGrid.Col = 0 Printer.Print , TextGrid.Text; TextGrid.Col = TextGrid.Col + 1 Printer.Print , TextGrid.Text Next X%
End Sub
One problem with the method shown above is that the song titles are not always correctly aligned. But I would like to be able to include some
otherformatting as well, so it would be easiest to send it directly to either
atext file (which I could pick up in Word) or to a Word file. Can anyone give me a clue as to how I go about this?
It would be more sensible to send it to the Printer - since that is where you want it to go in the end
You are missing positioning the fields Printer.Current X = ....
On Sat, 26 Jun 2004 04:21:27 GMT, "MouseHart" <Mo*******@trap .net>
wrote: Although the ultimate destination may be the printer, I still wonder if there is a way to send it to a file. That information would be useful to me for future reference, in case I wanted to export the data instead of print it. I will take your advice on positioning the fields, though. I was not aware of that command. Thanks.
Channel = FreeFile
Open "Test.dat" For Output As #Channel
For L9 = 1 To Max
Print# Channel, ItemOne; ' <- note ';'
Print# Channel, vbTab
Print# Channel, ItemTwo
Next
Close# Channel
Thanks a lot. Once again, commands I could not find in my book.
"J French" <er*****@nowher e.com> wrote in message
news:40******** *******@news.bt click.com... On Sat, 26 Jun 2004 04:21:27 GMT, "MouseHart" <Mo*******@trap .net> wrote:
Although the ultimate destination may be the printer, I still wonder if there is a way to send it to a file. That information would be useful to
mefor future reference, in case I wanted to export the data instead of
printit. I will take your advice on positioning the fields, though. I was
notaware of that command. Thanks.
Channel = FreeFile Open "Test.dat" For Output As #Channel For L9 = 1 To Max Print# Channel, ItemOne; ' <- note ';' Print# Channel, vbTab Print# Channel, ItemTwo Next Close# Channel
On Sun, 27 Jun 2004 04:07:08 GMT, "MouseHart" <Mo*******@trap .net>
wrote: Thanks a lot. Once again, commands I could not find in my book.
Don't you have a Help System ?
Some people use the VB5 Help file
Oddly enough I keep a backup copy of that file at: www.jerryfrench.co.uk/utils/vb5help.zip (all lowercase)
Thanks again, and no, I don't have the VB6 Help files. The Enterprise
Edition requires separate purchase of the MSDN collection, and I don't have
it. I appreciate the use of the VB5 Help, however. I'm sure it will be
fine for anything I need (until I actually learn what I'm doing, which could
be quite a while).
"J French" <er*****@nowher e.com> wrote in message
news:40******** ********@news.b tclick.com... On Sun, 27 Jun 2004 04:07:08 GMT, "MouseHart" <Mo*******@trap .net> wrote:
Thanks a lot. Once again, commands I could not find in my book.
Don't you have a Help System ?
Some people use the VB5 Help file
Oddly enough I keep a backup copy of that file at:
www.jerryfrench.co.uk/utils/vb5help.zip (all lowercase)
> Thanks again, and no, I don't have the VB6 Help files. The Enterprise Edition requires separate purchase of the MSDN collection, and I don't
have it.
Unless something has changed (and I doubt it has), the Enterprise
Edition of Visual Basic (as well as Visual Studio) comes with the MSDN
files on a separate set of CD's; you should have gotten them with your
purchase. You can view the entire MSDN online at this link... http://msdn.microsoft.com/library/default.asp
Specifically, open the "tree" to this...
Visual Tools and Languages
Visual Studio 6.0
Visual Basic 6.0
Product Documentation
Reference
Language Reference
The direct link to the Reference branch (Language Reference is under
this) is... http://msdn.microsoft.com/library/en...LROverview.asp
The direct link to the Visual Studio 6.0 branch is... http://msdn.microsoft.com/library/en.../vb6anchor.asp
Rick - MVP This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: MouseHart |
last post by:
I have a small program which lists my music files on my computer, but I
can't get it to print exactly the way I want it to. The data is viewed in
an MSFlexGrid named "TextGrid" and the following code will send it to a
printer, but I was hoping to be able to send it to either a text file or
directly to a Word for Windows file.
Private Sub Command34_Click()
Dim X%
For X% = 0 To TextGrid.Rows - 1
|
by: Sandy |
last post by:
can mfc application, send text data to opened notepad file in desktop?(live
transfer of data) . can anybody help
|
by: Miro |
last post by:
VB 2003
at the end of the code, this works great.
bytCommand = Encoding.ASCII.GetBytes("testing hello send text")
udpClient.Send(bytCommand, bytCommand.Length)
and this recieves it
Dim strReturnData As String = _
System.Text.Encoding.ASCII.GetString(receiveBytes)
|
by: Andrea |
last post by:
Hi
I've having a very strange problem using the SendInput API to send
text to other applications.
I've written the code and it seems to work well. I discovered a
strange problem: when I try to send the Y character to another
application, I got the following characters:
Y)
|
by: liujiaping |
last post by:
Hi, all.
I have a dictionary-like file which has the following format:
first 4
column 7
is 9
a 23
word 134
....
Every line has two columns. The first column is always an English
| |
by: shelley_2000 |
last post by:
What is the best approach to collect and load Employee Resume Data
from External Employees who may not have Microsoft access? If is
likely they will have Microsoft Word, but not Microsoft Access.
Is there any type of form/template that I could send to employees to
fill out and send back for me to import into the Access Database?
Or should I consider a Word Forms with some type of data extractor for
loading into Access database? and if...
|
by: the_ricka |
last post by:
Hi all,
I'm fairly new to python, but very excited about it's potential.
I'm trying to write a simple program that will accept input from a
command line and send email. The parameters I used on the command
line are for From address, To addresses, Subject and Body. For the
body, I thought it would be better to read the input from a file so I
could allow someone to nicely format the body with newlines in a text
editor and just read it...
|
by: Alex Bryan |
last post by:
Okay, so what I want to do is connect to dictionary.com and send the
website a word, and later receive the definition. But for now, I want
to focus on sending the word. A good guy from this mailing list said I
should look into the code and then figure out what the word you want
to be defined is called by the website. In other words, what is the
name of the word the user inputs. Okay, so using the firebug extension
I got the code that the...
|
by: saijin |
last post by:
I'm planning to call a list of data from an XML file but when I duplicate the content inside the <data></data> it is not showing anything
Here's the ActionScript 3.0
import fl.controls.ComboBox;
import fl.controls.TextArea;
import fl.containers.UILoader;
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |