Extracting A File From An Ole Object
first of all, sorry if it's not posted under the right section.
this is the question: i have an ole object with an embedded file. how can i extract the file with an event or function? i want this so i can just have a 1 file program. then, when i execute the program, it extracts the file, uses it, and then deletes it. can someone help me? is there a better way to do this?
thanx in advance
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Extracting Data From An OLE Object
I am reading an image from a databse and writing it to a file. I have an access database that stores images in a OLE Column type. I read the OLE Object from the database and write it to a .jpg file. My problem is the OLE Object writes to the file, not the JPG part of the object. I have been trying for a few days and I can not find out how to remove the data contained in an OLE object in Visual Basic. Doesn anyone know of a way to extract the data contained in an OLE object?
Thanks in advance,
Al
Extracting And Saving An Object
Hello,
Is there any way of exporting an embedded object, e.g. Shockwave flash, from an office document out to its original state (from embedded to 'file.swf') in vba?
I'm stuck so any help would be appreciated.
J.
Extracting Embedded Object Using VBA In Excel
Hi All,
I have some embedded text files and compressed files in my excel spread sheet. I want to save them in a seperate folder as seperate files. How to do that using vba?
I tried using Oleobject it didn't work
Thanks in advance.
Regards,
Subbu S
Extracting OLE Object In Access 2003
Hello, new to this site -
I am trying to iterate through an access database(MsAccess2003) and save all of the OLE Objects to disk. I am a C programmer but admittedly VB is far easier for these things, either way - I am unfamiliar of where to even start looking (naming conventions etc.). Any help would be greatly appreciated. Danke in advance.
Problem Extracting Data Using HTML Object Library
Hi all i am working on project that needs to extract artistname,albumname,... from a music page. As u see in the pic the artistname and albumname are missing and also albuminfo is placed under incorect column. Could an expert help me fix these problems. I enclused the copy of project and html page.Thanks
VB Code:
Private Sub Form_Load() WebBrowser1.Navigate "c:/page2.html" End Sub Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) If (pDisp Is WebBrowser1.Application) Then GetInfo WebBrowser1.Document End IfEnd Sub Private Sub GetInfo(HTML As HTMLDocument) Dim HTMLA As HTMLAnchorElement Dim HTMLT As HTMLTable Dim HTMLR As HTMLTableRow Dim HTMLC As HTMLTableCell Dim HTMLI As HTMLInputElement Dim pTYPE As Integer Dim TMP() As String Dim tArtist As String Dim LI As ListItem For Each HTMLT In HTML.getElementsByTagName("table") For Each HTMLR In HTMLT.rows For Each HTMLC In HTMLR.cells If HTMLC.colSpan = 5 Then tArtist = HTMLC.innerText pTYPE = 1 End If If pTYPE = 1 Then For Each HTMLI In HTMLC.getElementsByTagName("input") If HTMLI.Type = "checkbox" Then Set LI = ListView1.ListItems.Add(, "ID:" & HTMLI.Value, HTMLI.Value) End If Next For Each HTMLA In HTMLC.getElementsByTagName("a") If InStr(HTMLA.onclick, LI.Text) Then LI.ListSubItems.Add , , HTMLA.innerText LI.ListSubItems.Add , , tArtist Exit For End If Next Else For Each HTMLA In HTMLC.getElementsByTagName("a") If InStr(HTMLA.href, "WriteLyrics.asp?SongID=") Then TMP = Split(HTMLA.href, "=") If Not LIExists(Replace(TMP(1), "&Singer", "")) Then Set LI = ListView1.ListItems.Add(, "ID:" & Replace(TMP(1), "&Singer", ""), Replace(TMP(1), "&Singer", "")) LI.ListSubItems.Add , , TMP(4) LI.ListSubItems.Add , , Replace(TMP(2), "&Album", "") LI.ListSubItems.Add , , Replace(TMP(3), "&Song", "") End If End If Next End If Next Next Next End SubPrivate Function LIExists(sKEY As String) As Boolean On Error GoTo ItsNotThere Dim LI2 As ListItem Set LI2 = ListView1.ListItems("ID:" & sKEY) LIExists = True Exit FunctionItsNotThere:End Function
Extracting Imbedded .jpgs From A Word File To Copy Into A .html File... How?!
Hi all,
What im trying to do is parse through a Word file and extract certain blocks of text to paste into a .html file. This all works fine, but along with the text, i want to extract the pictures from the word file, turn them into a .jpg, and insert the picture into the .html file as well. When i look throught the Word.Document object, i cant find a Picture(s) property and im wondering on how to do this
If anyone out there has an idea please let me know
Thanks in advance
W.
Wurm
Resource File Problem - Extracting File To Path
Hello.
Could you please tell me how to extract file from the *.res file into a selected path? I already loaded all files into resource but r unable to process them from inside it so need to extract them. Coudn't find anywhere. Please help me with a line of code.
Thanks and best regards
Extracting A Number Out Of A File Name And Creating A New File
Is there a script that can do the following ?
Capture all files of a specific type in a specific folder and create a text file with the following info...
vfx -n 9724582499 -d faxmodem 1_9724582499.doc
vfx -n 9725101119 -d faxmodem 2_9725101119.doc
vfx -n 9722461109 -d faxmodem 3_9722461109.doc
vfx -n 8173451099 -d faxmodem 4_8173451099.doc
vfx -n 9726066666 -d faxmodem 5_9726066666.doc
vfx -n 9723357640 -d faxmodem 6_9723357640.doc
vfx -n 8172833175 -d faxmodem 7_8173451099.doc
vfx -n 9725424386 -d faxmodem 8_9725424386.doc
vfx -n 2142217688 -d faxmodem 9_2142217688.doc
Pay attention to the 3rd and the last columns. All files in a particular folder are in the format of 1_9724582499.doc..... etc.
I want to create a txt or csv file to extract the number from the name of the text file and put it in a seperate column and the corresponding file name in another column.
Is there a VB script or any kinda script that can do this ?
Extracting File Name
Hi all,
I am writting a code that opens a excel file and save some data of it into a text file. I want the text file to have the same name but with different extension.
Can anyone help me with that?
Thanks,
Fabio Pereira
Extracting A Cap File
Any one know how to extract a cap file using VB6 or winsock ?
Any help is always appreciated.
Extracting A .zip File
Hi, Is ther a way where i can extract a zip file to its current location without any zip software installed?
Self Extracting File
I want to create an EXE just like winzip's self extracting exe,
here my exe should extract files but should not store it in temp folder and should launch an application exe present in it.
can anyone tell me how to go about it
Extracting A File Name - How To?
hi,
I have to work with over 100 files, each one has a different name. ( from a mainframe and the files correspond to user names) After I ftp the files to my desktop is there a Vb command that can do that for me? I hope this forum is appropriate for this question.
thanks-
Extracting Wav File From Mp3
Hai..
I want to extract WAV file from the mp3,mpeg,avi or wmv files. Then i want to display that wav file in my appliation. I can do this work.But, my need is getting wav file from the above formats.
Thanking you,
E.Veera Raghavendra
Self Extracting 1 Setup File
Hi,
I can make a setup package with the package and deployment wizard but i actually want only 1 file.....
is there a program that makes a setup package of only 1 file...it may be zipped or so but it has to be self extractiing....with that i mean.... i want to double click on the setup file.....and everything happens automatic....
i don't mind if the user has to press, next next next...
but i only want 1 file..... and i don't want to use winzip or winrar or anything to zip it to 1 file!
just 1 installation file..... double click without any external aids...it has to start installing or self extract in a way and i just have to press next next to make it work....
Thx,
Inter
Extracting File Properties
Hello there,
I am using VB 6.0 to extract file properties from office applications and other file types. Like for exmple I can extract word count, number of pages from word and statistics for excel file. I am using word object and exxel object in order to get this properties.
Now my question, Is there a way wherein I can extract this properties without using these objects? I am able to get the GENERAL properties only without thye object but I need alse to get the Othere properties like when you right click the file itsellf you can see other tabs wherein there is some usable information stored..
Please help..
Thanks!
IANIAN
Extracting A File Name From A Path
Hello everyone,
In my application I set up a file dialog box for the user to choose a file on a server (using the filedialog method). So far, the only value I can get back is an entire path rather than just the file name:
f:dataprojects12345figure1.pdf (as type string)
Is there any way to have the filedialog return JUST the file name? I thought of loading this entire string into an array and somehow extracting everything up to the first "" from the right. If so, how would you load this string character by character into an array? Any ideas?
Any help would be greatly appreciated. Thanks!!
Kevin.
Extracting A File Name From .filename
Hello all,
I need a little help here.
I am trying to change the caption of a form after it is saved to the name of the file they saved. The problem I am running into is that the .filename property of the common dialog box lists the path and filename and extension. How would I eliminate the path and file extension.
I'm pretty sure its going to be using the Len function but I have never used it and cant make heads or tails of what I am reading about it. I am using vb 6 just to let you know not .net.
ralstad
File Extracting Program
I'm trying to make a program for the game "The Sims" where you download zip files, and you run this program, and it will take files from inside the zip file or from inside a folder, and place them in the correct location inside the Sims folders. So it has to do most of these things
1. Be able to select what drive the Sims is installed in (C:, D:, E:...)
2. Either to take a file from a saved zip file, or search a certain folder for certain files, and transfer them to a set folder.
3. Delete the original files after trasferring them, so it doesn't waste space.
I don't know Visual Basics compatability with zip files, so just give me the code and short instructions on what to do... give me a site, or something. Thanks, I hope this isn't asking too much!
Extracting Info From A AVI File
The application that I'm currently developing is a media database (movies, games, software, music). I got so far to the point that I my app is working at a user level of inserting data which will be stored into a mdb and with the possibility of covers, report etc.
I saw another software like my own which beside inserting specific attributes of a file it can take others like:
Example:
Movie file
Format extension, SizeFile, Lenght of the movie, video codec, rate, rezolution
About this mentioned I can take, so far, just the first two of them, (extension, and filesize) with filesystemobject, but how can I extract from a avi file info like lenght video codec rate and resolutin?
There is anyone who done this before?
Extracting Data Out Of A Txt File.
I have a text file that has data in it divided by pipes (|). I need to extract the data between the pipes and populate that into different text box-es. Is there an easy way to do this?
Thanks
Creating A Self Extracting ZIP File
Hello All,
Here is my dilemma; I need to install apps to mobile devices. Creating the cab files for the install package I have down pat. But I would like to make a GUI to create the desktop side of that.
I have the actual install side down but what I need help on is from the install maker utility making a way of creating the desktop exe file.
I’m trying to simplify the process of creating the install by adding all the variables on the main page and the application outputs a EXE that will install the package.
My questions (Finally):
1.Can I compile an application from another application.(Maybe creating a self extracting zip file?)
2.Thru VB 6, can I create a self-extracting zip file.
3.Can I then add my own icon for this?
Thanks for all the help I can get.
Extracting A .ZIP Or Other Archive File
Hi r33d3r,
How can I open an archive file? I want to use it something like this
VB Code:
Public Declare ZipExtract *blah blah*Public Declare MakeDir ' I have the code for this API already ;) this is not the right code but it's the idea! newFolder = "tmp_" & int(rnd * 500)MakeDir app.path & "" & newFolder & ""ZipExtract app.path & " he.zip", app.path & "" & newFolder & ""
Please I've been looking for this quite anywhere for the last 4 hours
Extracting A File Date
Hi all,
I have some files that are named like this:
EMDX20041103.rpt
How can I extract the date (20041103) from this? I am using scripting object to do stuff with files.
sanctos
Extracting Pictures From A File
Ok, there is a game I play that stores it's icons in a file called Icons.bni, it can be found here.
Code:
Icons.bni format:
(DWORD)Size of BNI header
(WORD)BNI Version
(WORD)Alignment Padding (Unused)
(DWORD)Number of Icons
(DWORD)Data Offset
For each icon:
(DWORD)Flags
(DWORD)X Size
(DWORD)Y Size
(DWORD[32])Products for this icon*
Image in Targa format
The array of dwords for products is empty if the flags field is non-zero, but it's always terminated with a NULL dword.
I want to extract the pictures and load the ones I need into a listview. Does anybody think they can help me out? Or point me in the right direction?
More information about the Targa format and icons.bni can be found here. I am really confused and I hope somebody who finds this interesting can help me out. Thanks!!
[Edit]
For those who don't know:
DWORD: A 4 Byte unsigned little endian integer
WORD: A 2 Byte unsigned little endian integer
[/Edit]
Extracting Images From A BNI File.
I have a file that is downloaded from Battle.net which is called icons.bni. Inside it has several "Targa" images that I would like to extract and I have no clue how to do this.
Icon BNI Docs
Here is some documentation on the format of the file and each image, but again I have no clue how to extract these images and furthermore put them into a listview.
Extracting MP3 File Info
Hey All...
I'm currently working on a project where I have two forms (frmMain and frmMP3Player). The first has a label on it (lblCurrTrack) where I want to display the Artist and Title of the MP3 track currently playing on the Media Player control on the second form (MediaPlayer1).
How do I go about obtaining the artist and title information from the MP3 file? I've had a look at some tutorials but they all seem to be about making a full MP3 player and I've not been able to modify the code in any of them in such a way as to get the information I need.
Any help you can give would be much appreciated.
Cheers!
Extracting A File Name While Its Opened.
Hey All,
How can I extract the full name, along with its extention when its opened. For example, if I double click a text file to view its contents, I would like to extract its filename to a variable. Please help...
Extracting Contents From A .RES File?
I recently received a .res file from a friend. There's supposed to be a few cursors in it but I don't know how to extract them from the file. Any ideas?
Extracting File Extension
How do you extract the file extensions from filenames (ie. doc, xls, ppt, etc.). I would like to use getExtension command but I am having trouble with the proper syntax. If you know how to use getExtension or a better way please let me know. Thanks.
Extracting Lines Of A .txt File?
From a beginner.
I am presented with a .txt file every month that contains a log of air-ground data communications between air traffic control and aircraft. The file is usually in the order of 5000 - 6000 pages. I am writing an application to make analysis easier. One task is to find where the ground system cancels the data link with a specific aircraft, which is characterised by the text line - CANCEL ALL CONTRACTS. I am able to extract each occurrence of this line and write it to a different file, however, the information that I really need (aircraft callsign and time stamp) occurs two lines earlier. How do I extract and add the previous 2 lines so that I write all three lines to the new file? I haven't tried an array as yet.
I use two Common Dialog Controls, one to select the file to read, the other to select the file to write and then the respective files are displayed in lblDataFile and lblFileWrite. I also use a text box (txtInput) to input the string that I am searching for.
Example of work so far:
Private Sub cmdSearch_Click()
Dim s1 As String
Dim s2 As String
Dim s3 As String
s1 = (lblDataFile.Caption)
s2 = (txtInput.Text)
s3 = (lblFileWrite.Caption)
'Open the file that data will be read from.
Open s1 For Input As #1
'Open or create write file.
Open s3 For Append As #2
Do While Not EOF(1)
Line Input #1, s1
If s1 = s2 Then Write #2, (s1)
Loop
'Close read file.
Close #1
'Close write file before reopening in another mode.
Close #2
'Displays message box when all required data is written to selected file.
MsgBox "Program has finished writing to file."
End Sub
Extracting Data From A Log File
I need to extract some data from a log file which has a known format produced by another programme.
The data I need is contained in lines 11, 27, 47 etc (increasing from 11 in multiples of 18).
These lines have a common structure relating the item processed and various properties eg
"ITEM 1 PROPERTY A","PROPERTY VALUE"
"ITEM 1 PROPERTY B","PROPERTY VALUE"
"ITEM 1 PROPERTY C","PROPERTY VALUE"
"ITEM 1 PROPERTY D","PROPERTY VALUE"
"ITEM 2 PROPERTY A","PROPERTY VALUE"
"ITEM 2 PROPERTY B","PROPERTY VALUE"
"ITEM 2 PROPERTY C","PROPERTY VALUE"
"ITEM 2 PROPERTY D","PROPERTY VALUE" etc.
Currently I read EACH line, check for the required property using string compare on the part of the line containing the property name and if true extract the property value.
Is there a better way to do this checking only those lines that I know corrrespond to the data I want to extract as I have not been able to figure one out.
Peter Brown
Extracting An Hex String From A Bin File
I have recently taken up a new hobby in repairing computers. I have bought an IC progger/reader which is ideal for repairing faulty BIOS chips amongst other things. The software that I use allows me to save either in hex or binary. When I save in hex I have no problems editing or examining these files using vb but they are really quite large compared to the binary files. What I would like to do is to be able to read the binary files into an application where I could extract a string of a certain length at a certain address for viewing and/or editing and then saving the new file back in binary format using vb6. Thanks for listening.
Extracting Paths From File
Hi,
I have a set of structured xml files and each file stores file paths in its tags. I'm trying to read the file paths and add it to a list box
Here's how the xml file looks
Code:
<XYZ.Project>
<XYZ.operatingSystem>Macintosh</XYZ.operatingSystem>
<XYZ.path>project/sample/myfile.pdf</XYZ.path> <XYZ.pathInArchive/>
<XYZ.resourceNumber/> </XYZ.Project> <XYZ.Project>
<XYZ.operatingSystem>Windows</XYZ.operatingSystem>
<XYZ.path>project/sample2/myfile2.pdf</XYZ.path> <XYZ.pathInArchive/>
<XYZ.resourceNumber/>
</XYZ.Project>
.....................
All i want is to read the text within the tags <XYZ.path> and </XYZ.path> and add it into a list box.
Can someone help me with this?
Thanks in advance
Extracting Zip File Into Excel With VB6
I frequently download a zip file from the internet and open it in excel.
The file has a header row which I ignore, and is comma delimited.
I re-sort the file (based on the first column) into descending order.
It would be nice to run a vb6 script to take the zip file, extract it, and then open it into excel.
Has anyone done this.
I tried searching the forum, but did not find anything, sorry if this is a repeat.
Extracting Data From BMP File
Hi All. I'm new at this and all the info at wotsit has not helped me.
I would like to extract the bitmap image out of a monochrome bmp file to obtain strings (or arrays, etc.) of 0's and 1's so that i can send them to a serial printer. Getting the image size (height and width) would also be a bonus.
I'm actually using embeddedVB for a pocket PC but i think pointers for VB6 would help me anyway.
Rgds from down under,
Kresho, Sydney Aust.
Extracting Data From Text File.
I have a hash report compiled from a help file. In case you don't know what this is, it is a text file with a list of all hash number identifiers, topic numbers and topic titles for a help file created with WinHelp. It has the extenstion ".dmp". I want to extract all of the hash numbers and topic titles from the file. I could use Input$ to get the text and parse the whole of that, which would work. However the file looks as if it's set up as a set of records, so it would seem best to access the contents as records rather than a block. But I can't figure out how to do this.
I can use (1) sequential file access to get each record, but this runs all fields of each record together, so I have a problem in separating them. I don't think I can use (2) Random access, as the topic titles are not of the same length so the records are not of the same length. And I can't get (3) Binary access to work as it gives me the error "Variable supports an Automation type not supported in Visual Basic." when I try to set data to a Variant.
So any thoughts on this?
Reading - Extracting - Writting To Txt File!
Ok I havent resarched into this so I dont have any code but was wondering what usefull advice I could get from the good people over here.
Basically I to read a text file and extract the mailto:whateveremail@waht.end from the text file then for it to remove the mailto: place it into another text file and repeat till end of file. But inbetween each email for it to place a comma ','
Any advice on code.
Extracting Lines From A Text File :)
Hi,
I wonder if somebody could help me here. I have a text file 'Teams.txt' which contains the following:
Wolves vs Charlton Athletic
2
A
Monday
"12:00"
1
RCB
Week No
#2004-03-08#
Wolves vs Fulham
1
A
Monday
"12:00"
2
EHB
Week No
#2004-03-08#
... more teams here
The sequence is repeated after 9 entries, for each fixture. The fixture has information such as time, day, date pitch no etc associated with it. What I want to be able to do is (because there will always be 9 entries) extract the first entry for as many fixtures in the text file. So in effect, what I will end up with is:
Wolves vs Charlton Athletic
Wolves vs Fulham
I have supplied the code I am using to read the file but I've become a bit stuck and would appreciate any help on this matter.
Open App.Path + "Teams.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, strLine
............
Loop
Close #1
Thanks a bunch guys,
MiniMe
Extracting Filename From File Path
Let's say I have a path to a file...
C:WindowsTestingjzollo.txt
How would I go about extracting only the "jzollo.txt". I am trying to write a function that will take the path of a filename, and retreive only the filename itself.
Extracting Spacific Text From A File
Waht I need to do is Pull some thing out of a text file.
The text file has little box like symbols to seperate items (see attachment for example) I need the part that is right after the equals sign.
thank you for any help.
Extracting A MIDI File From Res And Playing
Hi,
I want to load a midi file from the resource editor (say, filename.midi), and extract it into a temp folder like windows emp and then play it. Anyone know the code I should use? The midi file is loaded in the resource editor already.
Thanks for your trouble in advance,
Tom
Extracting A Table From A Html File
hi all
Im trying to extract a table from a html file and dump it to another html file
now once i have the data i know how to save it to a file thats no problems
but getting the correct data to begin with is what my issue is.
is there a way to instruct a control or anything to search the html file for the perticular table im after and copy it to a string. Then ill write some code to dump it to the body of another html file.
any help is appreciated
thanks
Extracting From Unknown Size Txt File
VB Code:
Public Sub loadMap() Open configFile For Input As #1 ' opens configuration file Input #1, configTxt ' stores data in configtxt Close #1 'close file configSplitArray() = Split(configTxt, "-") 'split the data in config configData.naMe = configSplitArray(0) 'assign map name configData.sizE = configSplitArray(1) 'assign map size O = 1 'resets out counter Open mapfile For Input As #2 'open the map file txtData = Input(configData.sizE, #2) 'stores all the map in txtdata Close #2 'close file mapSplitArray() = Split(txtData, ",") 'splits the map into readable characters For tileX = 0 To 14 For tileY = 0 To 14 tileS(tileX, tileY) = mapSplitArray(O) 'loops through adding the characters to the tile array O = O + 1 NextNext For S = 0 To 14 For T = 0 To 14 drawX = S * 30 drawY = T * 30 Select Case tileS(S, T) Case ("p") BitBlt FrmGame.Map.hDC, drawX, drawY, 30, 30, FrmGfx.grass.hDC, 0, 0, vbSrcCopy Case Else BitBlt FrmGame.Map.hDC, drawX, drawY, 30, 30, FrmGfx.tree.hDC, 0, 0, vbSrcCopy End Select Next NextEnd Sub
thats my code to input froma txt file also using a configfile
txt file =
Code:
,p,p,p,p,p,p,p,p,p,p,p,p,p,p
,p,p,p,p,p,p,p,p,p,p,p,p,p,p
,p,p,p,p,p,p,p,p,p,p,p,p,p,p
,p,p,p,p,p,p,p,p,p,p,p,p,p,p
,p,p,p,p,p,p,p,p,p,p,p,p,p,p
,p,p,p,p,p,p,p,p,p,p,p,p,p,p
,p,p,p,p,p,p,p,p,p,p,p,p,p,p
,p,p,p,p,p,p,p,p,p,p,p,p,p,p
,p,p,p,p,p,p,p,p,p,p,p,p,p,p
,p,p,p,p,p,p,p,p,p,p,p,p,p,p
config file - stores name and size
Code:
liamsMap-280
i get a subscript out of rnage error and i cant understand it can anyone see an eror?
thanks
|