How do you save OLE embedded file objects from MS-Word VBA 
Author Message
 How do you save OLE embedded file objects from MS-Word VBA

I have a client who has saved several emails from Outlook
with attachments.  The attachments are what she wants, but
unfortunately she hit "Save" rather than "Save Attachment",
so now she has a directory full of ".rtf" documents with OLE
file objects embedded in them.  I can open each of these documents in
Word and right-click the "attachment" icon to "Save
As...", but there are many such files and this is time-consuming.  

In VBA is it possible to save an embedded file of this
type programmatically ?  I can get to the object as
an "Inline Shape" whose "OLEFormat" property offers me
every option EXCEPT save file.  It does offer "Open",
which prompts me to open or save, but as I said, there are
a LOT of these files, and I would like to just run my code
without being prompted a hundred times for the location to save to.

Any advice would be greatly appreciated...

-jim parker



Mon, 12 Dec 2005 03:57:08 GMT  
 How do you save OLE embedded file objects from MS-Word VBA

Quote:
> I have a client who has saved several emails from Outlook
> with attachments.  The attachments are what she wants, but
> unfortunately she hit "Save" rather than "Save Attachment",
> so now she has a directory full of ".rtf" documents with OLE
> file objects embedded in them.  I can open each of these documents in
> Word and right-click the "attachment" icon to "Save
> As...", but there are many such files and this is time-consuming.

> In VBA is it possible to save an embedded file of this
> type programmatically ?  I can get to the object as
> an "Inline Shape" whose "OLEFormat" property offers me
> every option EXCEPT save file.  It does offer "Open",
> which prompts me to open or save, but as I said, there are
> a LOT of these files, and I would like to just run my code
> without being prompted a hundred times for the location to save to.

> Any advice would be greatly appreciated...

> -jim parker

If you can do it in Word, why not automate Word to do the task. Simple start
is to record a word macro to achieve this then examine the VBA code
produced. Once you have that the rest should not be too difficult.


Mon, 12 Dec 2005 04:30:48 GMT  
 How do you save OLE embedded file objects from MS-Word VBA
On Thu, 26 Jun 2003 06:30:48 +1000, "Harry Strybos" <nospam

Quote:



>> I have a client who has saved several emails from Outlook
>> with attachments.  The attachments are what she wants, but
>> unfortunately she hit "Save" rather than "Save Attachment",
>> so now she has a directory full of ".rtf" documents with OLE
>> file objects embedded in them.  I can open each of these documents in
>> Word and right-click the "attachment" icon to "Save
>> As...", but there are many such files and this is time-consuming.

>> In VBA is it possible to save an embedded file of this
>> type programmatically ?  I can get to the object as
>> an "Inline Shape" whose "OLEFormat" property offers me
>> every option EXCEPT save file.  It does offer "Open",
>> which prompts me to open or save, but as I said, there are
>> a LOT of these files, and I would like to just run my code
>> without being prompted a hundred times for the location to save to.

>> Any advice would be greatly appreciated...

>> -jim parker

>If you can do it in Word, why not automate Word to do the task. Simple start
>is to record a word macro to achieve this then examine the VBA code
>produced. Once you have that the rest should not be too difficult.

I tried this in word. But with the recorder running, you could not get
the menu when you selected the attached file. you could not highlight
Right click and choose save as. I am not the best macro user so maybe
it was something I did wrong.


Tue, 13 Dec 2005 20:03:10 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Inserting an embedded OLE object (Excel) in an Access Table (VBA)

2. How do I trap spelling error message fr embedded word OLE object

3. SAving a MS Word file to a PDF file and a text file

4. MS Word 97, VBA, WordToWed, DDE / OLE

5. VBA-assigning an OLE-object to an Ole-object-field

6. Creating Word documents from an Embedded OLE Word Template

7. Linking or Embedding an OLE object into an Access OLE DataType Field using DAO

8. How to change or save a MS Word file (*.doc) to a *.html file in VBScript

9. Linking or Embedding an OLE Object in an Access OLE DataType Field using DAO

10. Copying an OLE object from an Access table to Word via VBA

11. Retrieving Access OLE Object data from Word VBA using DAO

12. Create Word Document with VBA and use OLE Object

 

 
Powered by phpBB® Forum Software