Printing Problem
how can i print an Excel worksheet in a printer that is not my default printer.
give me an example, please
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Printing Printing Printing Printing Report Confused Help
Hey guys,
I want to print following bill. It has already been printed.
I want to fill some data in it and want to print it.
Have a look at attached image of the bill.
Dimensions are given too.
I tried with data report.
I put total field in report footer and send the value of this field from code itself.
But if there are 2 items then total field prints immediately after that.
whereas it should be printed at the bottom in front of the word TOTAL(printed in bill).
How to get it at right position?
How can I maintain the margins and dimensions each side?
Will data report do? or anything else should be right for doing this.
Help me people.
PLZ.
Kakadia.
Setting Printer In Draft Mode For DOS Printing Speed && Output As DOS Printing
I want to print in Draft Mode with DOS Printing Speed using DataReport Designer. Anybody can help me How to set dot matrix printer in Draft Mode i.e., speed of printing must be same as DOS Printing Speed.
I am using Code:Printer.PrintQuality = vbPRPQDraft but this code is applicable for resolution quality and printing time is taking same as printing from Windows environment and I need output same as DOS Printing
Is there any special codes, functions or printer properties to be adopted for DOS Printing Speed. I appreciate if anybody can help me for giving me a sample project.
My email is : chemtsr@yahoo.co.in
Regards / MANI
Problem Printing EXCEL After Printing Using A Macro In WORD
I have a strange problem...
I have created a WORD template which contains some buttons to print the document on a certain printer, with or without a logo. This is some standard VBA and works OK.
Code:
Application.ActivePrinter = "HP LaserJet 4250 PS"
ActiveDocument.PrintOut
Now here is the problem:
A document is printed using the macro in WORD.
Then if I want to print something in EXCEL to the "HP LaserJet 4250 PS", nothing is printed!!
However, if I print the EXCEL-sheet to any other printer, it is printed and then the excel sheet can be printed again on the "HP LaserJet 4250 PS"...
(I use Office 2003)
I have no clue what is causing this problem and how to solve this...
Can anyone help me with this??
Printing Problem With EditCopy() When Printing An MsChart In VB.NET
Hello!
Please I really need help! Here's my problem: I have a MsChart graphic in a form and I would like to print it. I red many post about printing with MsChart but none had my answer. My graphic have modified axis values because I only want to show the positive axis parts (of x and y). My problem is that my axis settings appear in the form but not on the paper! I know that as soon as I use EditCopy() function in my printing process, axis settings return to their initials values. Look at this MSDN description of EditCopy():
"Since both the data and the picture of the chart are stored on the clipboard, what gets pasted into the new application varies depending on the type of application. For example, if you execute the chart's EditCopy method in your code and then go to an Excel spreadsheet and select Edit Paste, the chart data set is placed in the spreadsheet. To insert the picture of the chart into the spreadsheet, select Edit Paste Special and select the Picture type."
I was wondering how to keep my axis setting on the paper by printing only the part of my graphic that is shown in the form and not the full graph. Is there an other way to print a MsChart without using the clipboard (Since no arguments can by pass to editcopy() to make it work the way I want) ?
Thanks you
Gab
VB Printing Using Printform And Disabling The Printing... Notification Pop-up
Has anyone had any issues with using the (VB6.0) form.Printform statement and had a "Printing..." pop-up not go away. The application is simply printing a form and sometimes the notification pop-up "Printing..." remains on the screen. The application is running on a W/2000 server and the printer is spooled on this server. There are actually 15 different printers and the user can select the printer. This looks like a resource issue but I am completely mystified on this one. Help anyone... Rick..
VB Data Report Printing Vs Dos App. Printing Speed
I have convert the system into VB (before it was in foxpro).
So the reports I build using VB Data reports.
Now the problem is that on dot matrix printer, my VB-report takes much time to print report
but the old-foxpro-system-reports takes less time to print their reports(may be due to character wise printing).
So there is any way to print report from VB dos-base like (character wise).
Please help me soon, I am in bottleneck of this project.
thanx
Need Help Saving And/or Printing A Textbox... And Printing In General...
Hello.... my program's main important output is into a listbox and some labels i have arranged to give the imprssion of a spreadsheet... (if you get what i mean), now i think i can work out how to save the various labels into a file, and to put them onto a page ready to print.. but i havent the slightest idea how to print from a VB application, and especially to print OR SAVE a whole listbox, thats contents dont fit on one screen...
once again, ANY help would be HUGELY appreciated.
Thanks
Jai
Suggestion On Printing A From With High Quality Printing
I want to print a from and I use the following method:
I capture the form image to clipboard, send the contents of clipboard to an invisible picture box and then print that picture box. So i have the whole form image printed to the paper as I wanted. But the problem is the medium quality of the result. Can anyone suggest me a better way of printing the form (higher printing quality) ?
Thank you everyone for all possible replies...
Michael Vlastos
Automation Engineer
Company Modus SA
Development Department
Athens, Greece
Printing A Picture && Printing A Box Around Text
I have a customer where I have to print many different reports. The customer desires 2 things, they are:
1. That the header containg their name, address etc. be printed on a receipt with a box surrounding the text. They would also like another section to have a box surrounding the printed data.
2. That a picture be printed at the top of the receipt showing their vineyard.
I could find no info in the many books that I have on how to do this.
Can anyone steer me in the right direction?
TIA
Dick Deeds
VB Printing To Zebra TLP2844 Printing
Hi all,
I am using to print some receipts with barcode to a Zebra TLP2844 printer from Visual Basic. The printing and alighnment all working fine and we are using the label of size 4.25" length * 1.25" width.
The problem is that after one label printed, the label continuously skipping, we want to stop at the start of next label. I have tried many way by adjusting the properties of the printer, but no effect. The following is the same code to use.
Can any one help help on this how we can stop the skipping once one label printed...?
Open printer.port For Output As #ff
Print #ff, Chr(13)
Print #ff, "N" + Chr(13)
Print #ff, "D" + <Darkness.Text> + Chr(13)
Print #ff, "A" + <CompanyNameX.Text> + "," + CompanyNameY.Text + ",0," + CompanyNameFont.Text + "," + CompanyNameH.Text + "," + CompanyNameW.Text + ",N," + Chr(34) + Companyname.Text + Chr(34) + Chr(13)
Print #ff, "B" + "150" + "," + "120" + "," + EO + "," + "1," + Trim(BarcodeN.Text) + ",1," + h + "," + EF + "," + Chr(34) + Trim(TestNumber.Text) + Chr(34) + Chr(13)
Print #ff, "P" & Quantity & Chr(13)
Close #ff
Detect Printing Error While Printing
hi,
Is there anybody know any VB API or any way i can use to detect printing error while printing in progress and return it (the error) back to the VB program to further process...
You help is greatly appreciated and thank you...
biosphere
Well Printing To HTML (not Printing A HTML Page)
How would I take a group of database records and create a HTML page from them (I would like to do without going thru Access, if possible)...
Basically, my real goal would be able to print custom reports I made user Printer.print and then give the user the option as saving this report in HTML (WYSIWYG fromat).
Any ideas? Is this far-etched?
Printing In VB
Hi guys..
I have a database (Access) and I have extracted all my data from the dbase. I have 2 questions here:
1. How do i open a text file and put all this data into it. Eventually, this will become a report in a text file
2. How do I print this text file?? I am using a network printer
Thanks!!
Regards
vivien
Printing
Hello
I have to print a picture, a couple of lines of text and quite a few variables (strings mostly). One sheet of paper has to be filled. these lines of text do not appear on any of my forms, but the variables do. Since I've got no clue how to code for printing , i'd like to ask for an easy but good way of doing this. I also have to generate a print preview. Can anyone help me? (i'm a complete newbie , so if i have to use some components that are not standard, tell me where to find them)
TIA
BTW: it has to be possible to run this on different computers with different printers.
Printing VBA Help
Need to print Microsoft Visual Basic Help file (which is displayed when Help menu is clicked in VBE) with the same directory way it is available, say, complete list of the contents & topic wise; similar to a book.
A command to print evrything in one go.
One can select the topic & print but the page formatting, say setting marging, is not available, so the printed one is occupying almost the whole page & not good for filing.
Can anyone guide?
Printing
I am just curious, how does the connection between a printer work, and is there a way to send a command to print a file through the parallel/LAN port?
Help Printing
I wrote a program for use in a restaurant POS (Point of Sale). The purpose of the program is to order food, keep track of sales, manage employee's time for payroll purposes, etc. There's only one problem... I don't know how to send a "ticket" to a receipt printer. Please keep in mind a receipt printer is not your typical printer... it prints on small thermal paper, like a Wal-Mart receipt would. Anyway, I don't think I need to use the .printform method because I don't wany any graphics, only text and I'm limited by paper size. So, does anyone know how I can send multiple lines of text to a receipt printer?
Help With Printing .doc From VB6
Here is a snip of my code. I can not seem to get anything to print from this code. neither local or network printer. I DONT get any errors, but it will not spool anything to the printers. Would someone help???
Code:
Private Sub cmdNewletterPrint_Click()
On Error Resume Next
Dim appWord As Word.Application
Dim docRef As Word.Document
Dim TempF As String
'RTB = RichTextBox
With RTB
TempF = App.Path & "News LettersTempFile.doc"
.SaveFile (TempF)
Set appWord = New Word.Application
appWord.Visible = True
Set docRef = appWord.Documents.Open(TempF)
docRef.PrintOut
docRef.Close wdDoNotSaveChanges
Set docRef = Nothing
appWord.Quit wdDoNotSaveChanges
Set appWord = Nothing
Kill (TempF)
.Text = ""
.SetFocus
End With
End Sub
Printing PDF's From VB 6.0
To All,
Sorry if this has been answered before, but I've searched this site numerous times, as well as the internet in general and I can't find the answer to my problem. I am trying to print a bunch of PDF's to a specific printer from VB. My programming skills are very strong and I know what I want to do ... I just lack a little bit of the OO declaration portion of VB. As suggested, have added "pdf.ocx" to my project.
I've found lots of snippets of code both here and on the internet, but none of them are complete enough to use - generally it is because they don't include the declarations. One example I found is: (Not including the Wait sub for brevity)
What is lacking is how is Pdf1 declared? I have tried numerous ways to define Pdf1, but none of them work. In the case below, how should I properly declare/define Pdf1.
Thanks in advance,
At wits end,
Jim
--------------------------------------------------------------------------------
Private Sub Form_Load()
dim w as Integer
dim ChosenFile(3) as String
'
' set the values for ChosenFile and w
'
For w = 1 To 3
Pdf1.LoadFile ChosenFile(w)
Pdf1.printPages 1, 1
Wait 5
Next w
End Sub
I
Printing IE In VB
I have a web link setup to a pdf. Using VB, I can open the the link using IE. Does anyone know how to automate printing the page from VB?
Thanks for the help.
Here is the code that I have so far:
Set Explorer = New SHDocVw.InternetExplorer
Explorer.Visible = True
Explorer.Navigate "http:\phx01.phx.com/reports/issrpts/Allcodes.pdf"
'This is where I need to be able to print the pdf
Set Explorer = Nothing
Printing
i have a question regardless the printing in VB. i used the code
"Printer.Orientation = vbPRORLandscape"
to print onlandscape then i add the code
"me.printform"
but how can i center the picturebox on the page and how can i fit it to the whole page..
please i am a new on VB programming and i need help..
thanks for advance
maha
Printing
Print data contents directly from the form using data control
along with access
Printing In VBA
hello,
I 'd like to print out the outcome displayed in an excel sheet and I've got a problem. the code is as follows:
Private Sub cmdprint_Click()
Dim y As Integer
y = bound3 + 12
DatabaseWorkSheet.Activate
Range(Cells(12, 1), Cells(y, 15)).Select
ActiveSheet.PageSetup.PrintArea = "$A$12:$O$y" ---> error
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub
I know I can't use a variable in that line causing the error. any ideas?
thanks,
TK
Printing In VBA
I want to print cells in excel directly to the printer by bypassing the driver so I have full control of the printers functions. In VB6 I would use code like the following below but it doesn't work in VBA. Is it even possible to do this in VBA or do I have to do something else to get the same results? What I'm trying to do is make labels on continuous paper with a dot matrix printer. If I use the simple printout command it formfeeds after printing which I do not want.
Private Sub Command1_Click()
Open printer.port For Output As 1
Print #1, cell1
Close 1
End Sub
Printing To PDF
OK - I tried searching the forums for info on this, but "pdf" is too short of a keyword to search with.
I am trying to set up a macro within my Excel Workbook that will allow users to print the file as a PDF. I am running across a small problem, though.
Here is what I would like to do, ideally:
1) Have the user run the macro
2) The macro will export the visible sheets in the workbook as a PDF document.
Here is what I am doing right now:
1) The user runs the macro
2) The macro attempts to print the workbook to a "prn" file, but gives me the following error:
Quote:
You are attempting to print a multi-page EPS file
Please print a single page to ensure that EPS output is correct.
How do I get rid of that error? Is there any way to cut out the middle man (Acrobat Distiller) and actually export the workbook as a PDF?
I would include the code I am using, but it works through multiple subs, and is somewhat complicated. If you need to see my code, I will include it.
Help With Printing
Say for example i have 3 printers connected to a computer. I need to print to one of them specifically without specifying it in the printer dialog box. I dont even want the printer dialog to come up. This printer is not and can not be the default printer of the computer. can anyone tell me how to specify the printer to be printed to?
Printing In VB Again...
Hello all,
Here is my problem. I have picture box on my form with labels, textboxes etc.
I want to send this picture box to a print preview form. I'm usi ngthe code found on here http://www.vb-helper.com/howto_print...ew_scales.html
I've changed it a little. Here is my code
I call the procedure via:
'User clicked print which will print customer
Dim wid As Single
Dim hgt As Single
'Make PreviewForm.HiddenPict behave as much
'like the Printer as possible.'
'Make it 8.5" by 11" in real size.
wid = PreviewForm.ScaleX(8.5, vbInches, PreviewForm.ScaleMode)
hgt = PreviewForm.ScaleY(11, vbInches, PreviewForm.ScaleMode)
PreviewForm.HiddenPict.Width = wid
PreviewForm.HiddenPict.Height = hgt
'Make it use the same scale as the Printer.
PreviewForm.HiddenPict.Scale (-1, -1.5)-(7.5, 9.5)
'Draw the preview onto the hidden PictureBox.
DrawPrintout PreviewForm.HiddenPict, Picture1
PreviewForm.Show vbModal, CUSTOMERS
The procedure DrawPrintOut is as follows:
' Draw the printout on prn, either a PictureBox
' or the Printer.
Public Sub DrawPrintout(prn As Object, Img As PictureBox)
' Make the object use 10 point Courier New.
' It is likely to be available on both the
' printer and in PictureBoxes.
prn.Font.Name = "Courier New"
prn.Font.Size = 10
prn.DrawWidth = 4
' Draw a 1" by 3" square in the upper left.
prn.Line (0, 0)-(3, 1), , B
' Center the text within the square.
'prn.CurrentX = (3 - prn.TextWidth(Text1.Text)) / 2
'prn.CurrentY = (1 - prn.TextHeight(Text1.Text)) / 2
'prn.Print Text1.Text
'' Copy the smiley face bitmap onto prn.
'prn.PaintPicture SmileyPict.Picture, 0, 1.25
prn.PaintPicture Img.Picture, 0, 1 / 25
End sub
Problem occurs on prn.PaintPicture Img.Picture, 0, 1 / 25 stateing its an invalid picture. Why?
If I were load a picture into the picture box all works well. Just won't print any of the labels even though they are visible in the picture box.
Help me please....
Printing A Tif
I was wondering if anyone could give me an idea how to get a tif to print in vb? I know there is a class that will let you do it in Java but am not sure how to code this in vb. I am able to print text to a default printer but also need to print tif's if a file is found in the folder for that date. Examples would be mucho appreciated. Thanks!!!!!!!!!!!
Printing Help
So I want to print some coupons for my uncle's beauty shop.
This is the thing each visit is 1 coupon 3 coupons makes 1 free thing of what u bought.
so u cut ur hair 3 times. U have 3 haircut coupons next time u show the coupons it will be free.
I need to print a form but.. I have no idea how to print and then change value of textbox1 for example.
Prints coupon 00001, textbox1.text = textbox1.text + 1 and then.. print again.
Anyone care to help me
Thanks in advance
Printing
I have only covered printing once for like 5 seconds. But I don't remember anything about it except something like Printer.whatever.... I think? If I were to click on a button, I want a label to print out but in a certain x/y position on the paper. Can somebody give me a simple code to look at to refer to?
Printing Help
Hello all!!
I am in need of some code for our company. Can anyone let me know how i can print an imagebox in vb6 to all availble printers on the network. Basically the imagebox will print to all printers on the network.? Can anyone help me here? Thanks!
Printing In VB
Hi All,
Currently I have a form that displays the results of a few sql queries accessing tables in one database. To print the information I have been doing a Control - Alt - Print Screen / copying into MS Word / Printing it out that way. What are some ways to print the form or data with a command button?
Thanks,
Derek
.TIF Printing
Can someone explain a little better why Visual Basic 6 can't print .TIF files. Is there any way at all? I tried out the GDI from onerror but my files are too big. Is there any other way to print .TIF from Visual Basic 6?
Also, I tried using the pdf.ocx. My code was pdf1.loadfile("file here") but it gave me an error saying someone about a class not set up right. LIB something. Sorry I don't have better information. Can someone give me some feedback? Thanks...
Printing
Does anyone know how i can print list boxs in one frame:
I have form that has 3 list box in it and want to print the list boxes all at once and in one page:
can someone please help me i need it urgent thanks.....
Printing
I don't know if this is the right place to post this, sorry if I've got the wrong area. Does anyone know if it's possible to print a form landscape on a page? Or possibly resize the printed form to take up the whole page? I'm currently only using the Form1.Printform command, so I may need to go further into it.
PDF Printing
I am trying to print to a PDF printer from VB5.0
the printer cannot be the default printer, I dont have the SDK
any one have any ideas
Printing From VB
I want to be able to print from the text boxes on my screen. However the text boxes are in an array.
Code:
rst.Open "Select Question From Questions, Archive WHERE Archive.Archive_Status = 'NA' AND Questions.Survey_ID = '" & ResultsID & "' AND Questions.Question_ID = '" & QuestionID & "'", cnn, adOpenKeyset
numlink = 1 'data_options = amount of questions needed
While Not rst.EOF
Load txtQuestions(numlink)
'Directly positions text boxes on the page
txtQuestions(numlink).Top = txtQuestions(numlink - 1).Top + txtQuestions(numlink - 1).Height + 100
txtQuestions(numlink).Left = txtQuestions(numlink - 1).Left
txtQuestions(numlink).Tag = txtQuestions(numlink).Top
txtQuestions(numlink).Text = rst("Question").Value
txtQuestions(numlink).Visible = False
numlink = numlink + 1
rst.MoveNext
Wend
rst.Close
If I wanted to print all of the text boxes, is it possible??
Printing Help
Hello all,
I can't figure something out and i have being searching for a long time. I am printing a variable that I have to a windows printer. My problem is that my variable is 624 characters, but only a very small portion of my variable gets sent to the driver.
Can you shed some light on this for me, some of my code is below.
If cmbPrinters.Text = "Main Printer" Then
For i = 0 To Printers.Count - 1
If Printers(i).DeviceName = gstrSecondPrinter Then
Set Printer = Printers(i)
Exit For
End If
Next i
MsgBox strLabelString
Printer.Print strLabelString
Printer.EndDoc
P.S. this is VB6
thanks so much
Printing...
How would i print a page like:
Code:
String
Listboxcontents
String
All I Need To Know About Printing
Hello Everybody,
I've some questions about printing...is there a complete tutorial about printing somewhere??? If not how do I do the following things: Change text style per letter...like first letter of a sentence(on one line) green and bold second letter underlined and blue. If so how??? And how do I set those things??? And another question...does the printer if I print a text that is to large to fit on one line continue it on the next??? And does it except tabs???And last but certainly not least...how do I print images between my text???
Blessed Be!
Neo Angelus
Printing
Dear Friends
when i finished programe, after how doi take print that,please inform me
Help Printing
This is what im trying to achieve,
I have my VB project with two forms, the first one collects information from the user and passes that info as a variables to the next form..
I want to print a report which is a .txt file outside the vb project, but I want to include information from the application into the report.
SAMPLE
Declaration.txt (txt file)
November 14, 2004
Name of the applicant : frmUserInfo.strName
SocialSecurity: frmUserInfo.strSSnumber
Occupation: frmUserinfo.strOccupation
Some lines of text go here but there are some spaces which I wish to fill in with some more information..fU]rmUserinfo.strDesiredPosition[/u] ,so that the information from that report could be different every time a new entry is added.
As you can deduct I have collected the user information in a form called frmuserInfo, also have stored the information in different variables, now what I need is : some how print the txt I have with the variables in the same document.
If someone could tell me a better way to do this I would appreciate it..
Thank you.
Are You Sure? Before Printing
Hi,
I want to add a macro which adds an "are you sure?" dialog before printing.
I can do the dialog, no problems, using workbook_beforeprint, but how can I use the routine to cancel the print if they click "no"?
Any help gratefully accepted,
A
Printing
Ok I know for most everyone here this will be a very easy task but I just can’t seam to figure it out.
What I need to do is create a program so that I can click a button and it will print an address on a large legal size manila envelope. I will need several different buttons for different addresses and it will need to print sideways because of the way the envelope is.
What is the best way to handle this? Excel or what?
Thanks for any help
Printing
Is there a easy way to do text wrapping? If the text is really big, I would like it wrapped to the next line. Right now it gets cut off. Also, is there a way to figure out the right side of the text, where it would be printing on the page exactly? Thanks.
Code:
Printer.Print "info to print......"
PRINTING (again!)
I have a simple question...
I have a PictureBox full of labels and I want to print it...simple...nothing more (for now)
I searched whole forum and found a lot of stuff related to printing but didn't find this simple thing..
I know that this doesn't work
Printer.PaintPicture Picture1.Picture, 0, 0
it prints me a blank page
I used form1.printform command, but my labels are too big for the form, and when I print it it doesn't print on the whole paper.. It depends on your resolution.
That's why I chosed touse PictureBox to fill in with labels and all I have to do now is print it...
How do I do that?
Printing
I am using this code to print all contents of a txt file.
Since I have not a printer, I use a virtual one, Adobe Acrobat Writer and I print to file !
However this code :
Code:
Private Sub cmdPrint_Click()
On Error GoTo ErrorHandler
Open (App.Path + "1.grp") For Input As #6
Printer.Print "OMID SOFT Group Mail (Version 1.0)"
Printer.Print "----------------------------------"
Do While Not EOF(6)
Input #6, ReadMail
If ReadMail <> "" Then Printer.Print (ReadMail)
Loop
Close #6
Printer.EndDoc
ErrorHandler:
Exit Sub
End Sub
opens a Save As (for print to file) dialog and when I cancel it, it will never run if I click on the cmdPrint.
How to resolve it ?
Printing
How can i print 4 Flexgrid in one paper ?
Please Help me,
Mansoor abdi
|