PC Review


Reply
Thread Tools Rate Thread

Am I an email enclosure?

 
 
ZipCurs
Guest
Posts: n/a
 
      13th May 2009
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 With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      13th May 2009
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 With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      13th May 2009
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.

 
Reply With Quote
 
ZipCurs
Guest
Posts: n/a
 
      13th May 2009
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 With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      13th May 2009
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 With Quote
 
ZipCurs
Guest
Posts: n/a
 
      14th May 2009
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
2.5in IDE Enclosure jvalh DIY PC 2 10th Mar 2011 08:35 AM
LAN enclosure newbuilder Support 0 9th Nov 2007 09:52 PM
2.5'' hdd enclosure Andrej Storage Devices 0 18th Dec 2004 12:30 PM
Enclosure SG Microsoft Word New Users 1 17th Sep 2003 11:43 PM
Re: Bad Enclosure (ME-720), Good Enclosure (ME-320), Nice Enclosure (HD-227) Mike Rogers Storage Devices 0 17th Jul 2003 02:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:32 AM.