Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Am I an email enclosure?
I am looking for a way to tell if an open Excel file is an email enclosure.
Is there a way to do this? Thanks in advance for any help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Am I an email enclosure?
Try the below. If this is pointing to you temporary folder then the open
workbook is opened from an email. Activeworkbook.FullNameURLEncoded -- If this post helps click Yes --------------- Jacob Skaria "ZipCurs" wrote: I am looking for a way to tell if an open Excel file is an email enclosure. Is there a way to do this? Thanks in advance for any help. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Am I an email enclosure?
OR to get the folder
Activeworkbook.Path -- If this post helps click Yes --------------- Jacob Skaria "ZipCurs" wrote: I am looking for a way to tell if an open Excel file is an email enclosure. Is there a way to do this? Thanks in advance for any help. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Am I an email enclosure?
Jacob,
Thanks, this is a good start. I guess the real question is how do I know that it is a temporary folder? Any folder can be named "temporary", correct? Thanks in advance for any additional help. "Jacob Skaria" wrote: Try the below. If this is pointing to you temporary folder then the open workbook is opened from an email. Activeworkbook.FullNameURLEncoded -- If this post helps click Yes --------------- Jacob Skaria "ZipCurs" wrote: I am looking for a way to tell if an open Excel file is an email enclosure. Is there a way to do this? Thanks in advance for any help. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Am I an email enclosure?
If you try and open an excel file from your email and try ActiveWorkbook.Path
it will return. Also the file will be opened in Read-only mode. So you can probably can validate these two... C:\Documents and Settings\<username\Local Settings\Temporary Internet Files\ If Instr(1,activeworkbook.path,"Temporary Internet Files",vbTextCompare)0 Then If Activeworkbook.ReadOnly = True Then Msgbox "File opened from Email" End If Else Msgbox "File residing in" & ActiveWorkbook.Path End If If this post helps click Yes --------------- Jacob Skaria "ZipCurs" wrote: Jacob, Thanks, this is a good start. I guess the real question is how do I know that it is a temporary folder? Any folder can be named "temporary", correct? Thanks in advance for any additional help. "Jacob Skaria" wrote: Try the below. If this is pointing to you temporary folder then the open workbook is opened from an email. Activeworkbook.FullNameURLEncoded -- If this post helps click Yes --------------- Jacob Skaria "ZipCurs" wrote: I am looking for a way to tell if an open Excel file is an email enclosure. Is there a way to do this? Thanks in advance for any help. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Am I an email enclosure?
Jacob,
That did the job. Thank you. "Jacob Skaria" wrote: If you try and open an excel file from your email and try ActiveWorkbook.Path it will return. Also the file will be opened in Read-only mode. So you can probably can validate these two... C:\Documents and Settings\<username\Local Settings\Temporary Internet Files\ If Instr(1,activeworkbook.path,"Temporary Internet Files",vbTextCompare)0 Then If Activeworkbook.ReadOnly = True Then Msgbox "File opened from Email" End If Else Msgbox "File residing in" & ActiveWorkbook.Path End If If this post helps click Yes --------------- Jacob Skaria "ZipCurs" wrote: Jacob, Thanks, this is a good start. I guess the real question is how do I know that it is a temporary folder? Any folder can be named "temporary", correct? Thanks in advance for any additional help. "Jacob Skaria" wrote: Try the below. If this is pointing to you temporary folder then the open workbook is opened from an email. Activeworkbook.FullNameURLEncoded -- If this post helps click Yes --------------- Jacob Skaria "ZipCurs" wrote: I am looking for a way to tell if an open Excel file is an email enclosure. Is there a way to do this? Thanks in advance for any help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Macro how to create email link for the email addresses in aRange or Selection | Excel Worksheet Functions | |||
Excel VBA macro to send email attachment from default email client | Excel Programming | |||
Send data from Excel in email from specific email address | Excel Programming | |||
Transfer Email addresses from spreadsheet to email address book | Excel Discussion (Misc queries) | |||
Email editor closes when forwarding Excel-embedded email | Setting up and Configuration of Excel |