Click here to Skip to main content
16,006,065 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionWant to get the Type of file? Pin
raheeli21-Nov-05 20:44
raheeli21-Nov-05 20:44 
QuestionRe: Want to get the Type of file? Pin
Briga21-Nov-05 22:01
Briga21-Nov-05 22:01 
AnswerRe: Want to get the Type of file? Pin
raheeli21-Nov-05 23:24
raheeli21-Nov-05 23:24 
AnswerRe: Want to get the Type of file? Pin
Briga22-Nov-05 0:13
Briga22-Nov-05 0:13 
GeneralRe: Want to get the Type of file? Pin
raheeli22-Nov-05 0:18
raheeli22-Nov-05 0:18 
QuestionThank You Everybody! Pin
Axonn Echysttas21-Nov-05 19:06
Axonn Echysttas21-Nov-05 19:06 
Questionhow can i print a document of file (.xls,.doc,.ppt,.pdf) its urgent Pin
raheeli21-Nov-05 18:20
raheeli21-Nov-05 18:20 
AnswerRe: how can i print a document of file (.xls,.doc,.ppt,.pdf) its urgent Pin
Steve Pullan21-Nov-05 18:58
Steve Pullan21-Nov-05 18:58 
The method you are using here will start the application which is associated with the filetype in FileName.

What you should be doing is create an instance of the application's automation object (which won't show the UI) and then use that object's methods to manipulate the file as appropriate.

Something like this... but beware this code is not complete - you'll need to do some further research for the exact sequence etc. but you get the idea...
Dim ExcelApp As Microsoft.Office.Interop.Excel.Application
ExcelApp = New Microsoft.Office.Interop.Excel.Application

ExcelApp.Visible = False
ExcelApp.Workbooks.Open(filePath.ToString())
ExcelApp.Worksheets.PrintOut(...)

Don't forget to include a reference to the Microsoft Excel 11.0 Object Library (from Project -> References -> COM tab etc...).

...Steve
GeneralRe: how can i print a document of file (.xls,.doc,.ppt,.pdf) its urgent Pin
raheeli21-Nov-05 19:18
raheeli21-Nov-05 19:18 
GeneralRe: how can i print a document of file (.xls,.doc,.ppt,.pdf) its urgent Pin
Steve Pullan21-Nov-05 19:30
Steve Pullan21-Nov-05 19:30 
GeneralRe: how can i print a document of file (.xls,.doc,.ppt,.pdf) its urgent Pin
raheeli21-Nov-05 23:35
raheeli21-Nov-05 23:35 
GeneralRe: how can i print a document of file (.xls,.doc,.ppt,.pdf) its urgent Pin
Steve Pullan22-Nov-05 12:27
Steve Pullan22-Nov-05 12:27 
GeneralRe: how can i print a document of file (.xls,.doc,.ppt,.pdf) its urgent Pin
raheeli22-Nov-05 17:01
raheeli22-Nov-05 17:01 
GeneralRe: how can i print a document of file (.xls,.doc,.ppt,.pdf) its urgent Pin
Steve Pullan22-Nov-05 17:38
Steve Pullan22-Nov-05 17:38 
GeneralRe: how can i print a document of file (.xls,.doc,.ppt,.pdf) its urgent Pin
raheeli22-Nov-05 18:00
raheeli22-Nov-05 18:00 
QuestionPizza Program Help Pin
pdm7621-Nov-05 17:13
pdm7621-Nov-05 17:13 
AnswerRe: Pizza Program Help Pin
Christian Graus21-Nov-05 17:39
protectorChristian Graus21-Nov-05 17:39 
GeneralRe: Pizza Program Help Pin
pdm7621-Nov-05 17:41
pdm7621-Nov-05 17:41 
GeneralRe: Pizza Program Help Pin
Christian Graus21-Nov-05 17:43
protectorChristian Graus21-Nov-05 17:43 
GeneralRe: Pizza Program Help Pin
pdm7621-Nov-05 17:51
pdm7621-Nov-05 17:51 
GeneralRe: Pizza Program Help Pin
Christian Graus22-Nov-05 11:12
protectorChristian Graus22-Nov-05 11:12 
GeneralRe: Pizza Program Help Pin
pdm7622-Nov-05 14:45
pdm7622-Nov-05 14:45 
QuestionGrab Frame From MPEG file (VB .NET) Pin
zammourr21-Nov-05 17:08
zammourr21-Nov-05 17:08 
AnswerRe: Grab Frame From MPEG file (VB .NET) Pin
Christian Graus21-Nov-05 17:39
protectorChristian Graus21-Nov-05 17:39 
Questiondic Pin
FaribaYousefi21-Nov-05 14:32
FaribaYousefi21-Nov-05 14:32 

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.