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 » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

attachment location



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 8th 08, 10:19 AM posted to microsoft.public.outlook.program_addins
SOPHIE
external usenet poster
 
Posts: 21
Default attachment location

hi, all

I am working on attachment. I don't know how to get the location of a
sending email' attachment.

I want to do some operation before the email be sent.

is "Source Property" works? but when i use it like this
"objMailItem.attachments.Source" or "objMailItem.attachments.item(1).source",
it seems wrong.

pathName property seem work, but when i check the mail attachment item,
pathName is null.

i need help.

thanks.
  #2  
Old October 8th 08, 01:38 PM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default attachment location

A file attached to a message is contained in that message, in the Attachments
collection. Outlook neither knows nor cares about the original location of
the file, which may no longer even exist.

If you want to do some work on that file, you need to save it to the local
drive using the Attachment.SaveAsFile method. You can then modify the file,
remove the original attachment, and add the new version.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54




"sophie" wrote:

hi, all

I am working on attachment. I don't know how to get the location of a
sending email' attachment.

I want to do some operation before the email be sent.

is "Source Property" works? but when i use it like this
"objMailItem.attachments.Source" or "objMailItem.attachments.item(1).source",
it seems wrong.

pathName property seem work, but when i check the mail attachment item,
pathName is null.

i need help.

thanks.

  #3  
Old October 9th 08, 03:20 AM posted to microsoft.public.outlook.program_addins
SOPHIE
external usenet poster
 
Posts: 21
Default attachment location

Thanks sue.
I will try in this way.

"Sue Mosher [MVP-Outlook]" wrote:

A file attached to a message is contained in that message, in the Attachments
collection. Outlook neither knows nor cares about the original location of
the file, which may no longer even exist.

If you want to do some work on that file, you need to save it to the local
drive using the Attachment.SaveAsFile method. You can then modify the file,
remove the original attachment, and add the new version.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54




"sophie" wrote:

hi, all

I am working on attachment. I don't know how to get the location of a
sending email' attachment.

I want to do some operation before the email be sent.

is "Source Property" works? but when i use it like this
"objMailItem.attachments.Source" or "objMailItem.attachments.item(1).source",
it seems wrong.

pathName property seem work, but when i check the mail attachment item,
pathName is null.

i need help.

thanks.

  #4  
Old January 7th 09, 03:23 AM posted to microsoft.public.outlook.program_addins
khai
external usenet poster
 
Posts: 13
Default attachment location

Hi Sue,

The SaveAsFile method works for normail emails. However, when I try to
execute this method on inline attachments (namely, images), I get the
following error:

"Cannot save the attachment. Cannot add the attachment; no data source was
provided."

Could you shed some light on why this is so, and how can I overcome it? Many
thanks in advance.

"Sue Mosher [MVP-Outlook]" wrote:

A file attached to a message is contained in that message, in the Attachments
collection. Outlook neither knows nor cares about the original location of
the file, which may no longer even exist.

If you want to do some work on that file, you need to save it to the local
drive using the Attachment.SaveAsFile method. You can then modify the file,
remove the original attachment, and add the new version.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54




"sophie" wrote:

hi, all

I am working on attachment. I don't know how to get the location of a
sending email' attachment.

I want to do some operation before the email be sent.

is "Source Property" works? but when i use it like this
"objMailItem.attachments.Source" or "objMailItem.attachments.item(1).source",
it seems wrong.

pathName property seem work, but when i check the mail attachment item,
pathName is null.

i need help.

thanks.

  #5  
Old January 7th 09, 02:20 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default attachment location

Sue's not available.

In that case there is nothing to go on for Outlook and most likely the
Attachment fields such as PR_ATTACH_FILENAME and such are blank. Are these
images or embedded Outlook objects? In any case about all you could do on a
low level would be to try to extract the attachment binary data and save
that out but you wouldn't know the file type or correct file format so that
wouldn't do much good at all.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"khai" wrote in message
...
Hi Sue,

The SaveAsFile method works for normail emails. However, when I try to
execute this method on inline attachments (namely, images), I get the
following error:

"Cannot save the attachment. Cannot add the attachment; no data source was
provided."

Could you shed some light on why this is so, and how can I overcome it?
Many
thanks in advance.


  #6  
Old January 9th 09, 10:53 AM posted to microsoft.public.outlook.program_addins
khai
external usenet poster
 
Posts: 13
Default attachment location

They are actually inline images. When I try to get the Type, it returns
olByValue.

I realise that I encounter this problem if I use Word 2003 to edit the email
messages (i.e. checkbox found under Tools - Options - Mail Format -
Message Format).

Is there a work around, to ensure that inline images will be saved correctly
even if Word 2003 is chosen as the editor?

"Ken Slovak - [MVP - Outlook]" wrote:

Sue's not available.

In that case there is nothing to go on for Outlook and most likely the
Attachment fields such as PR_ATTACH_FILENAME and such are blank. Are these
images or embedded Outlook objects? In any case about all you could do on a
low level would be to try to extract the attachment binary data and save
that out but you wouldn't know the file type or correct file format so that
wouldn't do much good at all.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"khai" wrote in message
...
Hi Sue,

The SaveAsFile method works for normail emails. However, when I try to
execute this method on inline attachments (namely, images), I get the
following error:

"Cannot save the attachment. Cannot add the attachment; no data source was
provided."

Could you shed some light on why this is so, and how can I overcome it?
Many
thanks in advance.



  #7  
Old January 9th 09, 02:36 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default attachment location

Not really other than not using inline images.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"khai" wrote in message
...
They are actually inline images. When I try to get the Type, it returns
olByValue.

I realise that I encounter this problem if I use Word 2003 to edit the
email
messages (i.e. checkbox found under Tools - Options - Mail Format -
Message Format).

Is there a work around, to ensure that inline images will be saved
correctly
even if Word 2003 is chosen as the editor?


 




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
Outlook attachment location andyoye Outlook - General Queries 0 July 10th 08 02:10 PM
default location attachment outlook 2000 Ramon Niese Outlook - General Queries 5 February 28th 07 01:30 PM
how to change the location of saving attachment permanenntly Mohammad Outlook - Installation 1 January 26th 07 10:18 PM
location of edited Outlook Express attachment rfeutl@telus.net Outlook Express 13 September 23rd 06 02:55 AM
Save Attachment Default Location Ken Outlook Express 4 July 27th 06 10:11 PM


All times are GMT +1. The time now is 11:14 AM.


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.