INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

scheduling an email to deliver a vb created excel file

scheduling an email to deliver a vb created excel file

(OP)
BOE XI

I use BOE quite a bit to schedule .rpt files but am now looking to schedule an .exe that will create an .xls file to be emailed.

I am not a VB developer but had someone in the office provide me with a simple test .exe file that I have successfully added to BOE using the CMC. It runs and outputs successfully to a path on the network as the code defines the path.

The code is basically as follows which is very simple just for testing purposes:

exportFileName = "//Server1/Reports/Filename_" & Format$(Now, "mmddyyyy") & ".xls"
    Open exportFileName For Output As #1
    
    Print #1, "This is a test"

HERE'S WHAT HAPPENS

When I try to schedule & run the above .exe to be emailed in BOE, the .xls IS written to the path defined in the code (which makes sense).  An email is generated with all of the content I setup in BOE (email body, email submtect filename etc) but the attachment is a blank .txt file...  It's like each proccess is running independently as they both parts do work.

HERE'S WHAT I WANT.

I want to use BOE to schedule the .exe to run (which is working) and deliver the .xls via an email.

in BOE, there is not an option to define the output type (xls, csv etc) as there is when adding an .rpt.  Is there a way to have BOE deliver the format of the file that is set in the .exe ? Do I need to add something to VB code so it 'talks' to BOE ? other ?

Thanks in advance.

RE: scheduling an email to deliver a vb created excel file

BOE can't do that.  It can only send emails with files that were generated through one of the standard BO tools.  However, if you're creating the .exe, you could always add a step to email from there.  You could pass the email address or list of email addresses into the program as a parameter from BO.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.

RE: scheduling an email to deliver a vb created excel file

(OP)
Thanks for info.  Scanning thru the help files and settings had me thinking this may not be possible as you mention.  I will look into the option you mention.  

I currently use BOE's 'specific email recipients' option which requires a 'TO' recipient and allows me to set the  email subject, cc, body etc. for mass emailing to different clients with different instances.

I can't picture how having the vb code handle the emailing & pulling the email addresses via BOe parameter will change these other portions of the email.  

I'm guessing I will not be able to use the 'specific email repients' option and the VB code will need to handle the email subject, cc & body as well.



 

RE: scheduling an email to deliver a vb created excel file

Yes, the VB code will have to handle everything around the emailing of the reports.  However, when you set a program to run in BO, you have an option to pass parameters into it.  What I might do is have a "configuration" file for each email that contains the addresses, subject, cc, and body information.  You would pass the name of the config file from BO to the program.  The program would then read the config file to get all of that information.

Good luck!

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.

RE: scheduling an email to deliver a vb created excel file

There are 3rd party tools, which could schedule a report (or even multiple reports), export the result to an excel and e-mail it to a hardcoded or dynamic e-mail address(es). If your data is not formatted you can even retrieve the data and export it without developing a crystal report first.
Check this list for some of the available products: http://kenhamady.com/desktopschedulers.pdf
I guess it will be cheaper to use an existing and tested application instead of develop your own from scratch. There are some free options too.

www.R-Tag.com Viewer, scheduler and report manager for Crystal reports and SSRS.
Send your report everywhere.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close