Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Save embedded object?

I have a spreadsheet with an embedded MIDI sound file as an object in the
spreadsheet...

How to I save/export this object, in VBA code, as a file on my harddrive???

I can do it manually, but when I try to 'record' the procedure, the
macro-recorder doesn't record the saving of the file...

Can this be done in VBA???


TIA,

CE



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Save embedded object?

AFAIK would need to extract the MIDI file from the xls file. IOW, read the
xls into a byte array, search for the MIDI file header, hope the file length
is in its next few bytes (+ header length), read the "section" as pertains
to the MIDI file into another byte array, then write that to file.

Only trouble is I can't find the anticipated MIDI file header when embedded
in an xls file (looking in a HEX editor). I'm looking for "MThd", or the
first 4 bytes in HEX of '4D 54 68 64'

Just had another look at a MIDI file in a HEX editor, although the header
"MThd" always exists not sure its file length is specified in the next few
bytes, which is odd.

That's as far as I've got, not the answer but perhaps a few clues for anyone
else interested to have a go.

Regards,
Peter T


"Charlotte E." <@ wrote in message
...
I have a spreadsheet with an embedded MIDI sound file as an object in the
spreadsheet...

How to I save/export this object, in VBA code, as a file on my
harddrive???

I can do it manually, but when I try to 'record' the procedure, the
macro-recorder doesn't record the saving of the file...

Can this be done in VBA???


TIA,

CE





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
Excel changes file extension on embedded object upon save Brent-GPTX Excel Discussion (Misc queries) 1 April 24th 09 05:23 PM
embedded pdf object [email protected] Excel Worksheet Functions 1 October 8th 07 04:32 PM
Need VBA for embedded object????????????? CB Excel Programming 0 May 2nd 07 08:18 PM
embedded ss object peter Excel Programming 0 March 21st 06 06:43 PM
embedded object C Williams Excel Programming 6 January 17th 05 03:22 AM


All times are GMT +1. The time now is 05:16 AM.

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

About Us

"It's about Microsoft Excel"