Open and print textpad files using API

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
sprathipati
Posts: 2
Joined: Mon Mar 10, 2008 7:20 pm

Open and print textpad files using API

Post by sprathipati »

Hi

Do we have any textpad API which i can use with .net ,if YES can you provide me the location where i can download?
My goal is to open the file in textpad,print and close it....all this should be done programmatically in .net

Thanks
gan

Post by gan »

This is pretty easy to do using .Net only (without textpad or any other text editor installed). Why do you want the dependency of textpad instead of doing this using .Net only?
sprathipati
Posts: 2
Joined: Mon Mar 10, 2008 7:20 pm

Post by sprathipati »

How can we do it in .net(Can you please provide me the link where i can find some examples).If we want to open a word file we use Microsoft.Office.Interop.Word, in the same way do we have any thing to open textpad files also.

Thanks
Saritha
bveldkamp

Post by bveldkamp »

You could use ShellExecute() with the "print" verb, although that's is not managed code. The good thing is that it doesn't matter what type of file you supply, it will open the associated application and print it.

Or use Word to print textfiles? It will handle those just fine.
Post Reply