msoutlook.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Create a rule or function that will open a file

 
Post new topic   Reply to topic    msoutlook.org Forum Index -> MS Office Outlook
Author Message
scott56hannah



Joined: 12 Aug 2007
Posts: 3

PostPosted: Mon Feb 11, 2008 7:59 pm    Post subject: Create a rule or function that will open a file Reply with quote

Hi,

I have a number of users that will be receiving an Excel file on a regular
basis. I want an outlook rule (I think) that when the email is received will
automatically open the file.

The excel file contains macros that will be trusted by each of the users and
when it completes is can be closed.

Is that possible within outlook to perform this type of action ?

Thanks
Scott

Archived from group: microsoft>public>office>developer>outlook>vba
Back to top
View user's profile Send private message
Ken Slovak - [MVP - Outlo



Joined: 12 Aug 2007
Posts: 405

PostPosted: Mon Feb 11, 2008 11:51 pm    Post subject: Re: Create a rule or function that will open a file Reply with quote

You can create a rule that runs a script (macro). It has to be declared like
this:

Public Sub whateverNameYouWant(Item As MailItem)
'blah, blah
End Sub

The Item.Attachments collection can be iterated and the Excel attachment
saved to the file system. The code can then automate Excel to open the XLS.

I wouldn't plan on distributing something like that though. You can't
distribute rules and distributing macros is problematical. I'd probably
recommend a COM addin for distribution purposes.

--
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


"scott56hannah" wrote in message @microsoft.com...
> Hi,
>
> I have a number of users that will be receiving an Excel file on a regular
> basis. I want an outlook rule (I think) that when the email is received
> will
> automatically open the file.
>
> The excel file contains macros that will be trusted by each of the users
> and
> when it completes is can be closed.
>
> Is that possible within outlook to perform this type of action ?
>
> Thanks
> Scott
Back to top
View user's profile Send private message
scott56hannah



Joined: 12 Aug 2007
Posts: 3

PostPosted: Mon Feb 11, 2008 9:21 pm    Post subject: Re: Create a rule or function that will open a file Reply with quote

Ken,

Would I develop this initially as a script (macro) as outlined below and then
when that is tested and working convert to an addin as is done in Excel.

Or do I need to develop this as a COM addin from the start ?

Thanks
Scott

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

> You can create a rule that runs a script (macro). It has to be declared like
> this:
>
> Public Sub whateverNameYouWant(Item As MailItem)
> 'blah, blah
> End Sub
>
> The Item.Attachments collection can be iterated and the Excel attachment
> saved to the file system. The code can then automate Excel to open the XLS.
>
> I wouldn't plan on distributing something like that though. You can't
> distribute rules and distributing macros is problematical. I'd probably
> recommend a COM addin for distribution purposes.
>
> --
> 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
>
>
> "scott56hannah" wrote in message
> @microsoft.com...
> > Hi,
> >
> > I have a number of users that will be receiving an Excel file on a regular
> > basis. I want an outlook rule (I think) that when the email is received
> > will
> > automatically open the file.
> >
> > The excel file contains macros that will be trusted by each of the users
> > and
> > when it completes is can be closed.
> >
> > Is that possible within outlook to perform this type of action ?
> >
> > Thanks
> > Scott
>
>
Back to top
View user's profile Send private message
Ken Slovak - [MVP - Outlo



Joined: 12 Aug 2007
Posts: 405

PostPosted: Tue Feb 12, 2008 2:01 pm    Post subject: Re: Create a rule or function that will open a file Reply with quote

Outlook doesn't have VBA addins. COM addins are developed from scratch using
a language that supports COM addins such as VB6, VB.NET, C#, C++, Delphi,
etc.

--
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


"scott56hannah" wrote in message @microsoft.com...
> Ken,
>
> Would I develop this initially as a script (macro) as outlined below and
> then
> when that is tested and working convert to an addin as is done in Excel.
>
> Or do I need to develop this as a COM addin from the start ?
>
> Thanks
> Scott

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
create a .msg file "from scratch" Hello there! I need to write a .msg file to be read in Outlook (not Express), in a ASP.NET application. Using Outlook automation is not an option because of several problem we´ve faced. The worst is the ***** screen "An application is trying to access ...

Reminding function in Team/Public Folder Hello, at first I would like to know how these folders are officially called in English - Team Folder or Public Folders? Both searchstrings turn up results in Google. Lets me explain my problem: We are working with Outlook 2000 and Exchange 2000. Since so

Rule not executing I have a rule that reads: Apply this rule after the message arrives sent to and with "Termination Notification" in the subject move it to the folder Everything in quotes are the instructions the rest is the standar label appl

Run a Rule from Macro Is it possible to fire a rule from a macro? Outlook 2003. Bye

run a rule via makro hello how can I run a defined rule via a makro? I'd like to have a button in Oulook to run that rule and I think the only way is to call a makro and this makro then has to run the makro. But how can I access rules in vba? thanks for your help Simon
Post new topic   Reply to topic    msoutlook.org Forum Index -> MS Office Outlook All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group