Weekly report automatisation - excel

I have to code an automated mail. This is a weekly report, containing texts, outlook tables, and up-to-dates excel charts. edit: before sending it, I need to check the mail.
I don't know what is the better way to code that and I want your point of view.
My first option is to create a special workbook with a new macro, and do everything with this new macro. I don't see any problem in managing multiple others workbooks and charts. But I am not sure if I can easyly works with the mail. Would it be possible to write/create table in outlook from excel ?
My second option is to work with outlook. I think I can write some code somewhere to launch excel macros and updates my tables. But i don't know much about this.
What would be the better approach ?
Edit: Let's say that I am just a little intern (lucky enough to make others thing than coffee), and the report is for my manager's manager's manager. No flexibility.

I would just email them the workbook with the report information in it. If they are employees of your company and they recognize your email(or the company's email) there shouldn't be a security issue with just sending them the workbook as an attachment with all th reports in it. You should be able to do that from Excel: http://msdn.microsoft.com/en-us/library/office/ff458119(v=office.11).aspx
You can update the excel file and then concatenate your data together to form the email body as well if you want - as well as obviously email the workbook itself or another updated workbook if you want.
Would be a big project if you are a beginner with VBA but is certainly doable.

If you're working with Outlook, you may also have access to 'SkyDrive' which will allow you to upload documents and files to shareable folder(s) and then send out alert emails to those sharing the folder. Probably a lot easier than writing some code that will most certainly have a never-ending maintenance burden.

Related

How do I extract data from an excel document attached to an email (Outlook 2010)?

I've seen loads of questions and answers to similar items but not quite the same.
I receive emails each day that have excel workbooks attached. I only need to use certain data contained within those workbooks so am after a way to do so without needing to open the email or the excel attachment.
NB - I have a number of stored emails so would like a way to perform this activity against those emails in one hit. IE not have to manually open each mail and/or workbook to see the values of interest.
I'm sure its possible, as it must have troubled people in the past, but I'm not sure how!
Please help!

Is there a way to auto-update Excel workbook without opening it?

I'm trying to learn better excel skills by working on a hobby project. Currently, my Excel workbook grabs data from an online database and archives it via command button. When I need to, I can look at a summary sheet which analyzes the data and presents it nicely.
The problem is that I need this data to be continuous and if I'm not around to click the command button it will have gaps in the data. The more accurate the better. So, I'm looking for a way that the workbook can be opened, updated and closed without me around. Better yet, if this is possible with something like OneDrive so I don't need my pc on all day - that would be the best solution.
Can anyone suggest a way for this auto-update process to work and/or inform me if OneDrive is capable of doing it also?

Excel - allow saving as pdf but no saving of original document

I have a heavily formulated workbook which will be used by staff members who will paste in potentially confidential client information. The workbook then comes up with graphics and data to summarize the imputed information
In an ideal world, the people using the program will be able to Save specific sheets as a PDF and would be able to close the program without saving changes to the worksheet but Excel always demands to save the template first, THEN will allow PDFs. This is obviously a problem as if a person uses it, paste's in a client's information and saves the result as a PDF then whoever next opens the Excel workbook will have that previous client's information showing.
SO. I either need a way to tell Excel to not require compulsory saving to allow PDF conversion or another option which will result in the same thing.
I should also note that the workbook has to allow users to paste in information so I don't imagine a Read Only will help :/
I have also attempted using a Macro-Enabled Template which still has the same problem
I imagine there's a ridiculously simple solution to this.
Thanks in advance

Excel VBA collect Dropbox badge information

I would like to avoid the conflicing copies Dropbox automatically will create if more than one person at the same time edit an Excel document.
Dropbox have made a smart "badge" with information popping up, if someone is opening the files while you have it open.
If you use VBA to open and save the documents, you might not see this information (especially not if you speed up the macro wiht displayalerts false).
Does someone here know how to make the VBA "ask" for this information? (would need the information to stop the user from saving the document).
There currently isn't an interface for querying this information, but we'll consider this a feature request.

Pasting multiple ranges from multiple sheets into a single email from excel

I come to you today seeking advice. I am using excel 2010 at work an I am using VBA to automate it and my Outlook account. I have a Workbook with multiple sheets to track the weights of various assets stored in multiple buildings. I have it set up now to whenever a user pushes a command button it will open outlook, copy a range, paste it as HTML in to the body, and fill out the To/CC/BCC/Subject lines, but for the life of me I cannot figure out how to get it paste multiple ranges on separate sheets into the SAME email when I need to update multiple buildings. I can post the code on Monday as I do not have access to it now. Essentially all I need to know is what command (like OLinspector, getobject, etc etc) will make the program recognize if an Outlook email instance is already running and paste x amount of other data that the user desires. This does not need to happen simultaneously, as the user must update multiple sheets and push a button to save the data to a database.
You don't have to "detect" anything. That will make things more complicated for you. The best option you can take is use the ever-useful and very famous methods of Ron de Bruin for Excel-Outlook integration, particularly pasting ranges into an e-mail's body.
Granted, you have your own code but if it's not based or similar to the one posted above, you have one disadvantage: pasting into the e-mail's body is not a nice way of doing it. Setting .HTMLBody to a range converted to HTML is much better.
One way I'll do the your process above is simple: I'll write a separate subroutine that creates a dummy sheet, pastes all the ranges/tables/cells/what-have-you there, and feed it to the sending subroutine above. That way, they are all consolidated in one area the way I want before they are transformed into HTML and used as the e-mail's body.
Let us know if this helps you in any way. :)

Resources