dbTalk Databases Forums  

Copy OLE objects to directory

comp.databases.paradox comp.databases.paradox


Discuss Copy OLE objects to directory in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Corey
 
Posts: n/a

Default Copy OLE objects to directory - 02-08-2007 , 03:00 PM






Hi all.

I wanted to know if there is a relatively straightforward way to scan a
table and copy objects from an OLE field to a Windows directory.

For example, say I have a table OLEDESC with two fields, IncidentNo and
DescriptionOLE, and it has the following records:

IncidentNo DescriptionOLE
100001 (embedded Word file)
100002 (embedded Excel file)
100003 (embedded jpg file)
100004 (embedded pdf file)

I ultimately want to put the embedded files in a directory
C:\Attachments\Description. Ideally, these files would have the IncidentNo
as the filename (although this is not absolutely essential). That would
make the resulting output as follows:

C:\Attachments\Description\100001.doc
C:\Attachments\Description\100002.xls
C:\Attachments\Description\100003.jpg
C:\Attachments\Description\100004.pdf

Can this be done? I can use writetoclipboard to write the embedded file to
the Windows clipboard (and then manually paste the file), but how do I
automatically paste that file to a Windows directory, using code?

Thanks.

- Corey



Reply With Quote
  #2  
Old   
Corey
 
Posts: n/a

Default Re: Copy OLE objects to directory - 02-08-2007 , 03:08 PM






"Corey"
Quote:
Hi all.

I wanted to know if there is a relatively straightforward way to scan a
table and copy objects from an OLE field to a Windows directory.

For example, say I have a table OLEDESC with two fields, IncidentNo and
DescriptionOLE, and it has the following records:

IncidentNo DescriptionOLE
100001 (embedded Word file)
100002 (embedded Excel file)
100003 (embedded jpg file)
100004 (embedded pdf file)

I ultimately want to put the embedded files in a directory
C:\Attachments\Description. Ideally, these files would have the
IncidentNo as the filename (although this is not absolutely essential).
That would make the resulting output as follows:

C:\Attachments\Description\100001.doc
C:\Attachments\Description\100002.xls
C:\Attachments\Description\100003.jpg
C:\Attachments\Description\100004.pdf

Can this be done? I can use writetoclipboard to write the embedded file to
the Windows clipboard (and then manually paste the file), but how do I
automatically paste that file to a Windows directory, using code?

Thanks.

- Corey
Oh, if it makes any difference, I'm using Pdox7 32-bit.

-Corey




Reply With Quote
  #3  
Old   
Liz McGuire
 
Posts: n/a

Default Re: Copy OLE objects to directory - 02-08-2007 , 03:15 PM



About the only thing I can find is to use a Binary type variable and the
binar method writeToFile(), but I don't know if that will work.

Liz


Corey wrote:
Quote:
Hi all.

I wanted to know if there is a relatively straightforward way to scan a
table and copy objects from an OLE field to a Windows directory.

For example, say I have a table OLEDESC with two fields, IncidentNo and
DescriptionOLE, and it has the following records:

IncidentNo DescriptionOLE
100001 (embedded Word file)
100002 (embedded Excel file)
100003 (embedded jpg file)
100004 (embedded pdf file)

I ultimately want to put the embedded files in a directory
C:\Attachments\Description. Ideally, these files would have the IncidentNo
as the filename (although this is not absolutely essential). That would
make the resulting output as follows:

C:\Attachments\Description\100001.doc
C:\Attachments\Description\100002.xls
C:\Attachments\Description\100003.jpg
C:\Attachments\Description\100004.pdf

Can this be done? I can use writetoclipboard to write the embedded file to
the Windows clipboard (and then manually paste the file), but how do I
automatically paste that file to a Windows directory, using code?

Thanks.

- Corey



Reply With Quote
Reply




Thread Tools
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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.