Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Macro how to create email link for the email addresses in aRange or Selection Satish[_2_] Excel Worksheet Functions 8 December 28th 09 03:30 PM
Excel VBA macro to send email attachment from default email client wifigoo Excel Programming 2 April 12th 08 03:54 PM
Send data from Excel in email from specific email address Erik Excel Programming 5 December 5th 07 05:09 PM
Transfer Email addresses from spreadsheet to email address book Beana Excel Discussion (Misc queries) 2 May 30th 06 06:07 PM
Email editor closes when forwarding Excel-embedded email Bambina Setting up and Configuration of Excel 0 March 16th 06 10:45 PM


All times are GMT +1. The time now is 06:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"