Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open CSV file, format data and write output to a text file. BristolBloos Excel Programming 1 October 18th 05 03:50 PM
Output to a file? Kevin Burton Excel Programming 4 October 4th 05 03:57 AM
Cannot open file for output DavidTM Excel Programming 1 September 27th 05 09:26 AM
CSV output file Suzanne[_5_] Excel Programming 2 March 4th 05 05:03 PM
VBA help to output a file Paula Weill Excel Programming 2 September 20th 04 02:12 PM


All times are GMT +1. The time now is 02:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"