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 - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Can I replace the attachment file when double chick attachment?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 3rd 06, 06:37 AM posted to microsoft.public.outlook
[email protected]
external usenet poster
 
Posts: 2
Default Can I replace the attachment file when double chick attachment?

I want to replace the attachment when double chick the attachment. I
use outlook form to do it.
Beause attachment read in outlook is not a cancelable event, I can't do
it directly.

I found outlook always store attachments file in directory:
"%USERPROFILE%\Local Settings\Temporary Internet Files\OLK*".
So if I want to replace the attachment when user double chick the
attachment, I can repalce the attachment file(will display) in that
directory.

I have some test, outlook allow me do that. But I meet two question:
First: the directory is different with each user, I always start with
the work I type before and end with a random value. How can I get the
exactly value of it in vbscript?

Second. When user chick the attachment, outlook will download the
attachment and save to the directory with the name: attachment
filename(number). If I have a attachment name "aaa.txt", it maybe save
with "aaa(10).txt". Can I get the exactly name of it?

Ads
  #2  
Old August 3rd 06, 07:00 AM posted to microsoft.public.outlook
Lanwench [MVP - Exchange]
external usenet poster
 
Posts: 651
Default Can I replace the attachment file when double chick attachment?



In ps.com,
typed:
I want to replace the attachment when double chick the attachment. I
use outlook form to do it.
Beause attachment read in outlook is not a cancelable event, I can't
do it directly.

I found outlook always store attachments file in directory:
"%USERPROFILE%\Local Settings\Temporary Internet Files\OLK*".
So if I want to replace the attachment when user double chick the
attachment, I can repalce the attachment file(will display) in that
directory.

I have some test, outlook allow me do that. But I meet two question:
First: the directory is different with each user, I always start with
the work I type before and end with a random value. How can I get the
exactly value of it in vbscript?

Second. When user chick the attachment, outlook will download the
attachment and save to the directory with the name: attachment
filename(number). If I have a attachment name "aaa.txt", it maybe save
with "aaa(10).txt". Can I get the exactly name of it?


Hi - unfortunately, I'm not sure I understand what it is you're trying to
do. You can't really control what happens to your mail once the user
receives it. Can you not just instruct the users to save the attachment
rather than merely opening it?


  #3  
Old August 3rd 06, 12:33 PM posted to microsoft.public.outlook
[email protected]
external usenet poster
 
Posts: 2
Default Can I replace the attachment file when double chick attachment?

What I want to do is: when user double click a attachment, chick open
in the Open, Save, Cancel dialog. normally it will display the
attachment file.
Now what I want to do is replace the file, display another file to
user.

So I do some code in Item_AttachmentRead() in outlook form, but the
AttachmentRead isn't a cancelable event. what ever I code in this
function, outlook will display the original attachment file after all.

But I found another way to do that: when the user double click a
attachment, click open, then outlook will download the attachment into
a Temporary directory, it's path is: "%USERPROFILE%\Local
Settings\Temporary Internet Files\OLK*", with filename: attachment
filename(number). then outlook will run the Item_AttachmentRead()
method, after that display the attachment file. So I think I can write
some code into Item_AttachmentRead() to replace the downloaded
Temporary attachments file in the Temporary directory.

So if I can get the "%USERPROFILE%\Local Settings\Temporary Internet
Files\OLK*" and the attachment filename(number), I can replace the
attachment to display.

My question is how can the get the exactly value of
"%USERPROFILE%\Local Settings\Temporary Internet Files\OLK*" and
attachment filename(number).

I have another question: If use double chick a attachment, then chick
save button in Open, Save, Cancel dialog, then save the attachment to a
disk, I can do nothing in this steps. I found BeforeAttachmentSave is
not work here. Is there any way I can do the purpose like
before(replace the attachment)? OR can I prevent user chick the
attachment(double chick and right chick)?

My outlook is outlook 2003. The code I want to write in is outlook
form.

Lanwench [MVP - Exchange] wrote:
In ps.com,
typed:
I want to replace the attachment when double chick the attachment. I
use outlook form to do it.
Beause attachment read in outlook is not a cancelable event, I can't
do it directly.

I found outlook always store attachments file in directory:
"%USERPROFILE%\Local Settings\Temporary Internet Files\OLK*".
So if I want to replace the attachment when user double chick the
attachment, I can repalce the attachment file(will display) in that
directory.

I have some test, outlook allow me do that. But I meet two question:
First: the directory is different with each user, I always start with
the work I type before and end with a random value. How can I get the
exactly value of it in vbscript?

Second. When user chick the attachment, outlook will download the
attachment and save to the directory with the name: attachment
filename(number). If I have a attachment name "aaa.txt", it maybe save
with "aaa(10).txt". Can I get the exactly name of it?


Hi - unfortunately, I'm not sure I understand what it is you're trying to
do. You can't really control what happens to your mail once the user
receives it. Can you not just instruct the users to save the attachment
rather than merely opening it?


  #4  
Old August 3rd 06, 04:10 PM posted to microsoft.public.outlook
Lanwench [MVP - Exchange]
external usenet poster
 
Posts: 651
Default Can I replace the attachment file when double chick attachment?



In oups.com,
typed:
What I want to do is: when user double click a attachment, chick open
in the Open, Save, Cancel dialog. normally it will display the
attachment file.
Now what I want to do is replace the file, display another file to
user.

So I do some code in Item_AttachmentRead() in outlook form, but the
AttachmentRead isn't a cancelable event. what ever I code in this
function, outlook will display the original attachment file after all.

But I found another way to do that: when the user double click a
attachment, click open, then outlook will download the attachment into
a Temporary directory, it's path is: "%USERPROFILE%\Local
Settings\Temporary Internet Files\OLK*", with filename: attachment
filename(number). then outlook will run the Item_AttachmentRead()
method, after that display the attachment file. So I think I can write
some code into Item_AttachmentRead() to replace the downloaded
Temporary attachments file in the Temporary directory.

So if I can get the "%USERPROFILE%\Local Settings\Temporary Internet
Files\OLK*" and the attachment filename(number), I can replace the
attachment to display.

My question is how can the get the exactly value of
"%USERPROFILE%\Local Settings\Temporary Internet Files\OLK*" and
attachment filename(number).

I have another question: If use double chick a attachment, then chick
save button in Open, Save, Cancel dialog, then save the attachment to
a disk, I can do nothing in this steps. I found BeforeAttachmentSave
is not work here. Is there any way I can do the purpose like
before(replace the attachment)? OR can I prevent user chick the
attachment(double chick and right chick)?


You can't do that as far as I know. (and I think you mean click, not chick
! ) You should probably post this in an Outlook developer's group for more
help, I think.

My outlook is outlook 2003. The code I want to write in is outlook
form.

Lanwench [MVP - Exchange] wrote:
In ps.com,
typed:
I want to replace the attachment when double chick the attachment. I
use outlook form to do it.
Beause attachment read in outlook is not a cancelable event, I can't
do it directly.

I found outlook always store attachments file in directory:
"%USERPROFILE%\Local Settings\Temporary Internet Files\OLK*".
So if I want to replace the attachment when user double chick the
attachment, I can repalce the attachment file(will display) in that
directory.

I have some test, outlook allow me do that. But I meet two question:
First: the directory is different with each user, I always start
with the work I type before and end with a random value. How can I
get the exactly value of it in vbscript?

Second. When user chick the attachment, outlook will download the
attachment and save to the directory with the name: attachment
filename(number). If I have a attachment name "aaa.txt", it maybe
save with "aaa(10).txt". Can I get the exactly name of it?


Hi - unfortunately, I'm not sure I understand what it is you're
trying to do. You can't really control what happens to your mail
once the user receives it. Can you not just instruct the users to
save the attachment rather than merely opening it?



 




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
attachment file order Dale Outlook - General Queries 1 June 4th 06 08:48 PM
File attachment Chandra Outlook Express 5 March 15th 06 04:31 PM
Sent Attachment Without File Extension Gerald Boutin Outlook - General Queries 2 March 2nd 06 04:34 PM
sending exel file as attachment Rami Outlook - Installation 1 February 23rd 06 02:51 PM
File attachment folder Patrickm Outlook - General Queries 9 February 7th 06 01:24 AM


All times are GMT +1. The time now is 12:30 PM.


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