Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Convert Bmp Files

How do i convert *.bmp files to *.jpg files?????

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How Do I Convert Wav Files To Midi Files With Visual Basic?
Please Help Me!!

I need to convert wav files to midi files with visual basic. Does someone know how to do it?



Maria Lorena Lůpez

Do You Know A Smart System To Convert HTML Files In PDF Files???
Hi my dear friends,

Sometimes I return here to ask a question...

I developed an intranet web site in which the users can generate HTML files. Due to a migration to a new system, the requirement is to get all these HTML files and convert them to PDF format, because the new system doesn't support HTML files.

I made a search on the net about this issue, and there is a lot of converters, but the problem is that I'd need to use only the technologies that are already installed, because the customer doesn't want to spend money in new third part software.

I'm wondering if it's possible to create a VB6 application that reads all the HTML files from a folder (path included, because I have to manage also subfolders) and convert them into PDF files. It doesn't matter if the process is so long, I can schedule it at night.

Any idea or suggestion will be appreciated.

Cheers and good weekend to all,


Try to teach something to someone, and you'll learn more than you expect of yourself!

Read Articles and Resources By Rock: This page contains links to several articles collected over time here at VbCity

Edited by - laurarana on 5/21/2007 3:16:26 AM

Convert .msg Files To Clean .txt Files
Hi all,

I have many (hundreds) of .msg files saved in a directory. What I need is some code to convert these files to plain text files to get rid of all that lovely outlook formatting gibberish. Something along the lines of programmatically opening up each message and using the SaveAs plain text option.

Any help will be appreciated.


Convert .ole Files To .doc
We have an application which uses .ole files to store free format notes, we need to convert these to Word documnets, or better still strip the text out and insert into a database field. Using the OLE container control I can open the .ole files and save as word documents with no trouble, the problem is I have to convert 100,000 files as a small part of an entire system conversion, and it looks as if this will take 30 hours to complete.

I have built in last run date etc, which should reduce the final run time as the vast majority of files will not change, however does anyone know a way of converting .ole files to .docs (or strip the text out) without opening Word each time round the loop. It currently runs slightly slower than 1 per second.


Convert RTF Files To PDF
I have code that creates a set of rtf files. I would like to write something to automatically convert these files to pdf.

I am using VB to generate the rtf files, is there vb code to generate the PDF files?

Convert XLS Files To TXT Using ASP
Current process is as follows ---
1. Open XLS file, saveas TXT.
2. Parse TXT file and do something.

The problem is when the XLS file is too large, over dialup connection, opening that file takes forever. So instead of opening the file on client, I want to set up a centralised system where I can convert the XLS files to TXT and then the user can parse the generated TXT file which will be much smaller. Hence the main goal is to take the process of opening the XLS file over to server.

So, I wrote VB DLL as follows --

Code:Function convertFile(mInput, mOutput)

    Dim xl_wb As Excel.Workbook
    Dim xl_app As Excel.Application
    Set xl_app = CreateObject("Excel.application")
    Set xl_wb = xl_app.Workbooks.Add(mInput)
    xl_wb.SaveAs FileName:=mOutput, FileFormat:=xlText, CreateBackup:=False
    xl_wb.Close SaveChanges:=False
    Set xl_app = Nothing
    Set xl_wb = Nothing
    convertFile = "Saved [" + mInput + "] as [" + mOutput + "]"
End Function

Created Util.dll and registered in Windows 2000 using regsvr32.

Next created ASP program as follows --
    Dim ans
    Dim myObj

    Response.Write "Creating Object<P>"
    Set myObj = Server.CreateObject("util.utilClass")

    ans = myObj.convertFile("/pub/Atul.xls", "/pub/Atul.txt")
    Response.Write ans

    Response.Write "DONE"

But when running, it runs forever and finally times out. Sometimes it gives error on line 10 which is a call to convertFile(). In task manager I do see Excel showing up. But nothing happens. The "/pub" is mapped correctly in IIS and the "Atul.xls" file exists.

OS: Windows 2000
VB: Version 6

Please help. Actually any help is appreciated....

Thanks in advance.

Edited by - LoongiMeinPoongi on 10/22/2002 9:26:41 AM

How Do I Convert All Files In A Folder From Hidden/hidden System Files To Regular?
I am looking to take all the files in a folder and all sub folders and convert them to regular files. See there are these folders where some files are hidden and some are hidden system files and some are regular files but I want to have a program that makes all of the files in the folder and all sub folder in to regular files. How do I do this?

How To Convert Doc Files To Html

I've seen a lot of posts for converting .doc files to .pdf, but does anyone know how to programmatically convert a .doc file to a .htm or .html? You should be able to do it, since Word allows you to do a Save As Web Page.

Thanks in advance.

Convert Many HTML Files To PDF
Hi everyone,

I've tried to checked the right section to post this...hope i'm right

I got alot of HTML files wich I need to convert to PDF

I have Acrobat installed. Any suggestions how to do it quickly?

Convert VB 6.0 Scripts To Exe Files

May I know which software can be used to convert VB 6.0 scripts to exe files?

Thank you.

How To Convert Files To A Program
I hav a .vbp
3 .bas
1 .FRX
1 .frm files
i want to take all of these and compile them into a do i do this?

Convert Clipper R5 Files To VB.
Hi All,

I want to convert some old Clipper applications to VB.
De database consists of .dbf, .cdx and .fpt files.
.dbf are table, .cdw are index and .fpt are memo files.

To convert .dbf to access is no problem,
the .cdx files is no problem in access.

But how to convert the .fpt files.

Anyone knows a solution?

Maybe there'is a program that converts everything in one step.


Convert WAV Files To Other Formats
Hi all

Can anyone tell me of any code/components that can convert a WAV file into other formats? for example into an MP3, MIDI or SMAF?



Convert From Excel To Txt Files?
any one has any vb.exe file that converts files from Excel to ASCII txt?


Convert Excell Files
Is there any way to have VB6 programmatically convert an embedded Excell
file into a text file (or any sequential file)? I am relatively new to VB6
and none of the books I have consulted have the solution. Thanks in advance.


Convert Class Files To OCX!

How do I convert an existing .bas and a class module into an .OCX so that I need not call the class file again and again!! convert

Convert Wav Files To Midi
Hi everyone
I need to create midi files from wav files with visual basic but I don't know how. Please help me!


How To Convert Files From Uppcase To Lowercase
Hi all!

I want to be able to run a little snippet of code to
a folder of my choice and make the files within
all in lowercase.

But I wanna do it in vb, and not use a commercial or shareware

Please advice

Best Regards

Convert And Save Files With DirectShow
If you reference quartz.dll in VB, you can get some DirectShow objects which let you arrange various media filters/codecs into what's called a "filter graph". This can be handy for doing all sorts of media type conversions. The process is much easier if you use the Filter Graph Editor program, graphedt.exe (sometimes named graphedit.exe?). But sometimes you want to do it programmatically from VB. The problem is, Microsoft didn't expose all the DirectShow interfaces for VB. For example, I wanted to convert MP3 files to WAV files. It's very easy in the Graph Editor program; yet in VB, you can link-up all the required filters, but you can't set the file name for the last "File writer" filter.
After banging my head for awhile trying to get this to work, I found this site:

There's some good DirectShow info there as well as a free dll that allows you to use the file writer filter (and other things). Here's the link to the dll:

The site claims that the size of the download is 11K , but it's actually 70K.

It works well for me. MP3-to-WAV or WAV-to-MP3 is no problem, and with all the different filters/codecs available there's no telling what you might generate.

Just thought I would share that.

Convert *.FON Files Into A Set Of Vector Graphics

I have just been given the rather odd task of attempting to turn a font file into a set of vector graphics (i.e like an image of each individual character stored as a vector graphic). I do not have a clue about the structure of *.FON or *.TFF files, and was wondering if anyone could give me any help on this. I am hoping to write a program in VB to convert a *.FON/*.TFF file into a set of vector graphics images. I was hoping that someone might be able to point me in the direction of some information or give me a hand with a good starting point etc.

Thanks in advance

How I Wanted To Convert HTML To .toc Files
hi, i'm creating help in VB .Net I'm already create HTML how to convert it to .toc files then make a .chm to complete my help files...

Convert Multiple PDF Files Into One DOC File
Can anybody give me some guidance as to where I can find some info one how to convert multiple PDF files into one word doc (I don't care if it's RTF or whatever)? This would help me out SO much if I could make a userform to select multiple PDF files and convert it into one DOC because all of the PDF files have such small amounts of writing that it's a HUGE waste of print paper

Convert Textbox Contents To Files
How would I convert the contents of a textbox into text files.

Say I have a textbox containin the following...

13-02-00 - Paul Oakenfold
06-02-00 - William Orbit
30-01-00 - Laurent Garnier
23-01-00 - Guy Ornadel
16-01-00 - Dave Clarke
09-01-00 - Scott Bond
02-01-00 - Mr C

I would like to loop thru the textbox and need each line to be saved as a
text file under that name. So I would end up with 7 blank text files e.g....

13-02-00 - Paul Oakenfold.txt
06-02-00 - William Orbit.txt
30-01-00 - Laurent Garnier.txt
23-01-00 - Guy Ornadel.txt
16-01-00 - Dave Clarke.txt
09-01-00 - Scott Bond.txt
02-01-00 - Mr C.txt

I've tried getting the contents of the textbox


Convert All Word-files In A Directory To PDF
Hi everybody,

I'm new to VB and I'm a Macro to convert all wordfiles in a directory to PDF using the Adobe PDF Printer.
It works great but I have to hit return for every file because he asks for a filename.
I tried Sendkeys but I can't get it to work correctly, because the Script stops when i run PrintOut and the
filename dialog appears. I even tried "printOut Background:=True" but the same.
when I use Sendkeys "^p" to print it works for the first time but then the macro is too fast, the PDF Conversion
requires to much time. So I only get one file converterd.
I'm not in the office, so I will post the Sourcecode tomorrow.

I see 2 possible solutions:
- recognize when printing to PDF is done and continue then
- or be able to send enter when using printOut

I hope someone could help me please.



How To Convert The PDF,DOC,JPG,xls,BMP Files To Tiff File.
Hi all,

After a long time, I faced a very critical problem in my system.

Basically We want to convert the PDF,DOC,JPG,xls,BMP etc.. files to *.tiff file thru VB code.

Please assist.

How Can We Convert Doc File 2 Html Files?
Hello Every One,

How can we change a word document 2 HTML format.

Convert Excel Plots To Jpg Files
I have several plots w/ datas in excel and I'd like to write a marco(or a program) to convert each of them into jpg files. How would I do that?
Please help!!!!!

VBScript && Excel - Convert Tab Delimited Files To Excel Files
I am trying to write a vbscript that will open a collection of .tsv (tab-delimited) files in Excel, change the formatting of the files (i.e., insert rows, change font size, add column headings, etc.), and then save the files as fully-functional Excel files. At this point, the vbscript I have written will do all of the formatting tasks I require. It will not, however, save the .tsv files as fully-functional Excel files. Iíve tried solutions suggested in the Automating Office Applications section of MSDNís site without any luck. It seems like Iíll need to modify

objXL.ActiveWorkbook.SaveAs (ďfilenameĒ)

to specify somehow XLFormat.

I stumbled across this site while searching for a way to accomplish this task and Iím hoping that someone here will be able to help point me to a web site that includes informatino on how to get a vbscript to change the format when saving from Excel. Thanks in advance.

How To Convert PDF,DOC,EXCEL,JPG And BMP Files Into TIFF Format

As per our requirement, I need to create one function in VB which converts PDF,DOC,EXCEL,JPG and BMP files into TIFF file.

Can anyone help me ?

Thanks & Regards,

Modify Script To Convert Multiple Files

I'm really new on visual basic and i've found this script that i've tested and works fine, but i'll like to know if it can be modified to be used with multiple files and wildcards:

Option Explicit
'* Declare Constants
Const cVBS = "2crlf.vbs"
'* Declare Variables
Dim boo_CR
Dim boo_LF
Dim boo_OK
Dim intARG
Dim strARG
Dim strMSG
strMSG = "Converted files:" & vbCrLf
Dim strOTF
'* Declare Objects
Dim objARG
Set objARG = WScript.Arguments
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim objOTF
'* Convert Each Drag-and-Drop File
For intARG = 0 to objARG.Count - 1
strARG = objARG(intARG)
strMSG = strMSG & vbCrLf & strARG
If objFSO.FileExists(strARG) Then
'* Read File
Set objOTF = objFSO.OpenTextFile(strARG,1)
strOTF = objOTF.ReadAll()
Set objOTF = Nothing
'* Convert File (if applicable)
boo_CR = False
boo_LF = False
If InStr(strOTF,vbCr) > 0 Then boo_CR = True
If InStr(strOTF,vbLf) > 0 Then boo_LF = True
If boo_CR And boo_LF Then
boo_OK = False
strMSG = strMSG & vbCrLf & vbTab & "(Not Converted)"
ElseIf boo_CR Then
strOTF = Replace(strOTF,vbCr,vbCrLf)
boo_OK = True
strMSG = strMSG & vbCrLf & vbTab & "(Converted CR)"
ElseIf boo_LF Then
strOTF = Replace(strOTF,vbLf,vbCrLf)
boo_OK = True
strMSG = strMSG & vbCrLf & vbTab & "(Converted LF)"
End If
'* Write File
If boo_OK Then
Set objOTF = objFSO.OpenTextFile(strARG & ".txt",2,True)
Set objOTF = Nothing
End If
strMSG = strMSG & vbCrLf & vbTab & "(File Not Found)"
End If
'* Destroy Objects
Set objARG = Nothing
Set objFSO = Nothing
'* Done
MsgBox strMSG,vbInformation,cVBS

Any help would be greatly appreciated!

Can I Convert Text Files To HTML Format In VB ?
I am desperately trying to convert simple text or RTF format files to HTML documents. Is there any method in VB which converts (like in MSWORD) text or RTF files to HTML documents. If you have source or algorithm please provide me.

Prashant J.

Convert Excel Figures To Jpeg Files
Does anyone know how to automatically save the excel figures(like a graph) to jpeg file and save it to specific directory ?
Writing a macro or something like that

Convert Existing Crystat Report Files(7.0) To PDF Using VB Programme
Hi guys !

am new to this forum.

this is related to Crystal Report.
i have some .rpt files generated using crystal 7.0
is it possible to print the same to PDF format ?
ofcourse i can do manually using Distiller and some other.
i want to do it programmatically using VB6.0

is it possible to do so?
if so, pls suggest me.

really its a wonderful forum ! !
thank u guys.....

How To Convert Outlook Express Dbx Files To Some Other Readable Form
I don't know how to read dbx file. Is it possible to convert them to dbf or access files

Convert Wav Files To Mp3/vox Files
Hi all,

how i can convert the wav files into mp3 files ? I need the source code in vb so that i can embed into my existing program

Convert .snp Files To .pdf Files??
Does anyone know how to convert a .snp(snapshot file) into a pdf file in vb or vba?
any help would be appreciated

Convert Large Binary Files (3270 Exports) To Text File Format.
Access XP doesn't appear to import Binary files when exported directly from Attachmate.
Some of these files are quite large 18mb - to 100mb.

When I attempt to open the files in Access XP they fail and lockup Access XP. I have looked at the file format with some Hex compare utilities and they report that the file is 'Binary'.

If I take the same exact file and open it in Notepad then click save the file date and time changes and the file works perfectly with Access XP. (And the HEX compare utility no longer indicates that the file is binary)

Now that I am aware of this limitation - How do I take the file called XYZOutput.txt - open it in VB with FSO and write it back out as the same file name?

My theory was - If I can open the file in notepad - make NO CHANGES - but click 'SAVE' - the file structure changes from binary to text.

I have the following code to open the file and close it - but in VB it does not change the structure the way notepad.exe did?

One catch - the routine needs to handle large files, and since they are large I don't want to make a second file. I don't know what the file size limitation is of Notepad.exe. I want to fix the broken file. So for example - If my file is called "XYZOutput.txt" I want the VB routine to open this large file 'fix the formatting from binary to text' and save it.

'' Code ----------------------------------

    Dim fso As FileSystemObject
    Dim fil As File
    Dim ts As TextStream

    Set fso = CreateObject("scripting.filesystemobject")
    Set fil = fso.GetFile(sourcefile)
    Set ts = fil.OpenAsTextStream(ForAppending)
    Set fso = Nothing

Code To Convert A Picturebox Picture Into Negative Or Convert A Negative Picture To C
i keep getting a code error on the line 'red = (pixel & ) Mod 256'

Private Sub Command1_Click()
For i = 0 To Picture1.ScaleHeight - 1
For j = 0 To Picture1.ScaleWidth - 1

'pulling out values of RGB
pixel = Picture1.Point(j, i)
red = (pixel & ) Mod 256
green = ((pixel And &HFF00) / 256&) Mod 256&
blue = (pixel And &HFF0000) / 65536

'flipping colors to the other side of the color range
'(essientally if it is
'20% of the 255 range it becomes 80%, if it is 30% of the 255

'range it becomes 70%. The midpoint is around 128)

red = 255 * (1 - red / 255)
green = 255 * (1 - green / 255)
blue = 255 * (1 - blue / 255)
Picture1.PSet (j, i), RGB(red, green, blue)

End Sub

anyone know the problem

Printing Multiple MSWord Files. Files Do Not Print In The Same Order As Instructed By Code
I am printing multiple Word files from VB using the code indicated below. The order in which they come out of the printer is not the same as that followed by the code.

What can I do to get them to come out of the printer in the same exact order as executed by the code.

Code Used:

For nI = 0 to n

sFile = "File" & Trim(Str(nI)) & ".doc"

Documents.Open FileName:=sFile, ConfirmConversions:=False, ReadOnly:=
True, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="" , Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="",

ActiveDocument.PrintOut Range
            :=wdPrintAllDocument, Item:=wdPrintDocumentContent, Copies:=1, Pages:="",
             PageType:=wdPrintAllPages, Collate:=True, Background:=True, PrintToFile
            :=False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0,


Converting Maya Learning Edition 4.5 Files To DirectX .x File, Where Do I Get Files?
i havent been able to get hold of maya 4.5 convetor to directx .x files

ive checked the dx8 sdk and its only got up to v4 for maya, which doesnt work

ive got some sdk for dx9 but it doesnt seem to be in there either, i might be wrong on that if so tell me,

i just need something to convert the files thanx

How To Build An Exe That Erases Files From Temporary Internet Files And Clears Cookies
How to Build an Exe that Erases files From Temporary Internet Files and Clears Cookies using win API

How Can I Make Files With VB, Or Save Files To A Chosen Directory By Using The Browse
I wanna know how to make files in VB. For example a text file.
I also wanna know how to save files to a chosen directory by using the file browser.
This is the code I've used, but it doesn't save the file:

VB Code:
With CommonDialog1     .DialogTitle = "Save"  'sets the dialog title       .InitDir = "C:"  'sets the initial directory       .Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"  'sets the file types      .ShowSave  'show the dialog  End With

Edit: I wanna allow overwriting.

How Do I Play Midi Files And Wave Files At The Same Time In My Form?
How do I play midi files and wave files at the same time in my form?

This is a big question of mine and I've already abondoned one other project because of it!


Convert BMP To GIF
Hi OnError,

is it now allowed to resitribute the new GDI+ DLL ?


Convert BMP To GIF
Is there an API or some easy way to do this? I looked around and couldn't find anything..

Convert 24 Bit Bmp To 8 Bit
how do i convert a 24 bit (grayscale) bmp file to a 8 bit (grayscale) one??
thank you.

Convert Jpg To Bmp
i need a simple code or a link for converting jpg to bmp
thank you

Convert Bmp To Jpg?
How can it be done?

Copyright © 2005-08, All rights reserved