Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how can i output the file
there is a txt file object in the excel file
(insert - object - create from file) how can i read the txt file's contents or save the file? thanks for method and advices |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how can i output the file
I seem to remember some code posted, about the middle of last year, here,
for extracting embedded files (from Peter T ?), but can't find the link now. Maybe this will point you in the right direction. This opens the text file in the default app for that file type. Not really tested, but seems to work for text files: Private Sub CommandButton1_Click() Dim EmbedObj As OLEObject For Each EmbedObj In ActiveSheet.OLEObjects With EmbedObj 'See if it is Embedded If .OLEType = xlOLEEmbed Then Select Case .progID 'Check the type Case "Package" '.Verb xlVerbOpen .Verb xlVerbPrimary Case Else 'Not dealt with End Select Else 'Linked. Get the filename ? End If End With Next End Sub If you are feeling adventurous, this looks like the C++ (?) source code to read such objects from the XL file: http://pldaniels.com/ripole/ NickHK wrote in message ups.com... there is a txt file object in the excel file (insert - object - create from file) how can i read the txt file's contents or save the file? thanks for method and advices |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open CSV file, format data and write output to a text file. | Excel Programming | |||
Output to a file? | Excel Programming | |||
Cannot open file for output | Excel Programming | |||
CSV output file | Excel Programming | |||
VBA help to output a file | Excel Programming |