A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Extract path from OLE files



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 16th 07, 11:43 PM posted to microsoft.public.office.developer.outlook.vba,microsoft.public.outlook.program_vba,microsoft.public.vb.general.discussion
Matt Williamson
external usenet poster
 
Posts: 21
Default Extract path from OLE files

I have many word docs that are OLE links in Outlook and I need to extract
the path and filename. Outlook itself is very sparse in its handling of
olOLE type attachments, but I've found that I can save them to disk. When I
look at the file using Ultraedit, it comes up in hex. I can clearly see the
path I want to extract in plain ascii text at the bottom of the file, but it
isn't at the same offset in each file and it looks like there is a unicode
version of the same string in the file as well. My initial attempt at
extracting it was to read the whole file into a string buffer, find the
offsets for the starting "\\" and ending ".doc" and pulling it out that way,
but since it's in there multiple times, that didn't work so well. I'm just
trying to get an idea of what would be the best way to extract that string.
Is there a definition file for this type of OLE object? I know I've only
mentioned Outlook, but I'm doing this in VB6 using the Outlook Object model.

TIA

Matt


  #2  
Old July 17th 07, 08:57 PM posted to microsoft.public.office.developer.outlook.vba,microsoft.public.outlook.program_vba,microsoft.public.vb.general.discussion
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Extract path from OLE files

You won't have much luck - OLE attachments are stored in an IStorage object.
What exactly is there, is up to the host app (Word in your case), Outlook
has no idea what is in there.
Look at an OLE storage with DocFile Viewer (or with OutookSpy) to see fi
there is any stream in that storage taht you can easily parse.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Matt Williamson" wrote in message
...
I have many word docs that are OLE links in Outlook and I need to extract
the path and filename. Outlook itself is very sparse in its handling of
olOLE type attachments, but I've found that I can save them to disk. When I
look at the file using Ultraedit, it comes up in hex. I can clearly see the
path I want to extract in plain ascii text at the bottom of the file, but
it isn't at the same offset in each file and it looks like there is a
unicode version of the same string in the file as well. My initial attempt
at extracting it was to read the whole file into a string buffer, find the
offsets for the starting "\\" and ending ".doc" and pulling it out that
way, but since it's in there multiple times, that didn't work so well. I'm
just trying to get an idea of what would be the best way to extract that
string. Is there a definition file for this type of OLE object? I know I've
only mentioned Outlook, but I'm doing this in VB6 using the Outlook Object
model.

TIA

Matt



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
UNC Path problems Simon Outlook - General Queries 0 March 9th 07 11:03 AM
where/what path are the PST files located Steven Outlook - General Queries 4 February 27th 07 01:56 PM
Path to Messages rogeepete Outlook Express 7 October 10th 06 10:54 PM
change the cache mode path (.ost file path) bln-ami Outlook - Installation 0 July 18th 06 09:45 AM
FAST wizard, FASTconv.exe Need to extract dbx files johnh Outlook Express 1 January 25th 06 12:48 AM


All times are GMT +1. The time now is 05:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.