Click here to Skip to main content
15,891,513 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to use sql Query Exec Master..xp_CmdShell 'bcp "Select * from AsplData..customer" queryout "D:\test.xls" -c' in vb.net Pin
Paul Conrad8-Dec-07 5:41
professionalPaul Conrad8-Dec-07 5:41 
Questionlog in to the database Pin
deepblu@webmail.co.za28-Nov-07 22:03
deepblu@webmail.co.za28-Nov-07 22:03 
AnswerRe: log in to the database Pin
_mubashir28-Nov-07 23:50
_mubashir28-Nov-07 23:50 
AnswerRe: log in to the database Pin
Paul Conrad29-Nov-07 12:25
professionalPaul Conrad29-Nov-07 12:25 
Questionhow to get document name in print event in vbs Pin
stephan_00728-Nov-07 21:22
stephan_00728-Nov-07 21:22 
AnswerRe: how to get document name in print event in vbs Pin
Dave Kreskowiak29-Nov-07 2:56
mveDave Kreskowiak29-Nov-07 2:56 
GeneralRe: how to get document name in print event in vbs Pin
stephan_00729-Nov-07 3:37
stephan_00729-Nov-07 3:37 
GeneralRe: how to get document name in print event in vbs Pin
Dave Kreskowiak29-Nov-07 7:34
mveDave Kreskowiak29-Nov-07 7:34 
stephan_007 wrote:
so you think no matter which application i do use, i can't get the filename which is just printed?


Nope. There is no generic Windows print function that automagically knows how to interpret and print every file format. When you click on a file in Explorer (or any other app for that matter) and click Print, the application that created the file is launched and IT prints the file, and follows the process I outlined earlier. Nowhere in the process does the printing syustem ever know, or care about, the filename of the job that is printing.

If this is an Explorer type app where you are in control of launching the printing process for each file, then that is the only place you can get the filename. Just before you launch whatever code you're using to print the document. Trying to get the filename from the printing printing system is impossible since it doesn't know anything about filename.


A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: how to get document name in print event in vbs Pin
stephan_00729-Nov-07 11:52
stephan_00729-Nov-07 11:52 
GeneralRe: how to get document name in print event in vbs Pin
Dave Kreskowiak29-Nov-07 12:31
mveDave Kreskowiak29-Nov-07 12:31 
GeneralRe: how to get document name in print event in vbs Pin
stephan_00729-Nov-07 22:39
stephan_00729-Nov-07 22:39 
GeneralRe: how to get document name in print event in vbs Pin
Dave Kreskowiak30-Nov-07 2:34
mveDave Kreskowiak30-Nov-07 2:34 
QuestionHandles event Pin
break_day28-Nov-07 20:29
break_day28-Nov-07 20:29 
AnswerRe: Handles event Pin
N a v a n e e t h28-Nov-07 20:38
N a v a n e e t h28-Nov-07 20:38 
GeneralRe: Handles event Pin
break_day28-Nov-07 22:16
break_day28-Nov-07 22:16 
AnswerRe: Handles event Pin
gericooper28-Nov-07 21:18
gericooper28-Nov-07 21:18 
AnswerRe: Handles event Pin
Mycroft Holmes28-Nov-07 21:59
professionalMycroft Holmes28-Nov-07 21:59 
AnswerRe: Handles event Pin
Luc Pattyn28-Nov-07 23:01
sitebuilderLuc Pattyn28-Nov-07 23:01 
QuestionPaging Programming Help Needed Pin
Jack Black X28-Nov-07 19:29
Jack Black X28-Nov-07 19:29 
AnswerRe: Paging Programming Help Needed Pin
Dave Kreskowiak29-Nov-07 2:51
mveDave Kreskowiak29-Nov-07 2:51 
QuestionHow to print out a RichTextBox Pin
re infecta28-Nov-07 19:26
re infecta28-Nov-07 19:26 
AnswerRe: How to print out a RichTextBox Pin
N a v a n e e t h28-Nov-07 20:44
N a v a n e e t h28-Nov-07 20:44 
GeneralRe: How to print out a RichTextBox Pin
re infecta28-Nov-07 21:21
re infecta28-Nov-07 21:21 
GeneralRe: How to print out a RichTextBox Pin
Dave Kreskowiak29-Nov-07 2:47
mveDave Kreskowiak29-Nov-07 2:47 
GeneralRe: How to print out a RichTextBox Pin
Duncan Edwards Jones29-Nov-07 3:09
professionalDuncan Edwards Jones29-Nov-07 3:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.