Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to test if word doc contains other docs 1

Status
Not open for further replies.

vb5prgrmr

Programmer
Jul 5, 2002
3,622
US

I have previously asked this question in Forum707 in Thread707-409701 and forum68 in thread68-410576 and have not recieved an answer in either forum so this is my last ditch effort unless someone knows of another place that may help. (yeah I know but I wouldn't belive I would have that many people stumped)

I have recieved a word document that has been used to send an email to multiple recipients. This doc/mail also has other word docs as attachments.

1. What Property/Method do I need to look at to be able to distinguish between a "normal" document (a document that has not been used to send email from) and a doc/mail (a document that has been used to send email with its fields (To, From, Subject etc.) filed in)?

2. If said doc/mail has attachments how to extract them and save them in a directory of my choice?

Any help would be greatly appreciated.


OS=Win2KPro Sp2
Office=2KPro Sp2

 
I'm sure that you've tried this, but there are some email references in the Word Object Model which is at:

I'm sorry I haven't used this particular functioanlity, so I can't give more detail
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Unsure what you mean

But if you like, you can mail me samples of both kinds of files (JustinEzequiel at yahoo dot com)

then I'll see what I can come up with

however, I would probably not be able to get back to you until Monday as I'll be taking a long weekend
 

johnwm,

Yes, I have been through that a couple of times. You get a star because that eventually led me to the MVP site where I found out that Word uses an OLE 2.0 Structured File Format.

Thanks for the effort



JustinEzequiel,

If you have word 2k you can create the doc/mail yourself (Customer data and all). On the standard toolbar, fourth icon from the left with a tooltip of E-Mail, click on that. This will open up and display From, To, and Subject fields. Fill in at least the To field and the subject field. Then goto the menu Insert>File (you have to have the cursor in the body of the document with the to and subject lines filed in for this to be enabled.) and select another word document. You will see an attachment line appear with the name of the document you have attached. You do not have to send this out to replicate the problem I am having. Just go ahead and save the document as a differnt name than the origional and close word. Reopen the new document and you will see your normal display of toolbars and menus and it looks like the origional. If you click on that button again you will see that the document was saved with another document embeded and the to and subject fields filled in as you have left them.

Ok, so now you have an origional document and a doc/mail like I have recieved.

So to restate my first question...

1. How to tell the difference between the two (doc/mail and doc)?

And as I say to many...

GOOD LUCK!

 
I only have Word XP and Word 97 here and cannot find the toolbar button you mentioned.

JustinEzequiel at yahoo dot com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top