Forward Message after editing attachments and include edited attachments

Status
Not open for further replies.

Jeffclanders

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Hi All,
I have a process where someone receives an email with possibly a variety of attachments. There will always be one attachment that is an excle file. This excel file must be opened from the attachment, edited and/or approved with the first level approval, and then saved to the desktop, and reattached to the email to be fowarded to a supervisor for final approval. At the final approval stage, the excel file is once again opened by the supervisor and a pdf is made of one sheet along with an approval.

I have macros already that allow for the push of a button to approve the excel sheet and add a signature to thre excel file, as well as another macro for supervisor approval to add the supervisor name and apprvoal to the excel file and then save it as a pdf.

I also can create a new email with a macro as well. However, this all needs to be done within the context of a forwarded mail to keep all conversations and attachments, other than the excel file, intact along the way so others can view them.

The question is how can I cobble all 0of these macros together? I need someone to be able to open an email, open the excel file, make any edits as well as apprvoe it, then save it to the desktop, and also attach the updated file back to the email to be forwarded on to the next person. The same will apply for when the supervisor is required to open the forwarded email, approve it, and then create a pdf of a sheet and attach the edited excel file, along with newly created pdf to the forwarded email they received to send it on again?
 
how about forward, open excel sheet, edit it then create the pdf and attach?

Attaching the pdf is no problem - as long as it's saved in a specific location - the last macro at Create a New Message using an HTML File or Stationery shows how to find the newest file in a folder. You'll then add the file to outlook using .attachment.add sNew

Are your macros excel or outlook macros? It doesn't really matter, but if it's a macro for one program, you need to reference the other application.
 
Ok Diane, thanks for the reply, so if I understand you, I can accomplish the goal of opening an email, editing the excel attachment, saving that excel file to desktop, additionally saving a pdf version to desktop, and then reatttaching both the pdf and the edited excel file back on the mail to be forwarded?

I have some previous macros from you to send files by email and to forward ones I highlight and select. Would I simply use the forward email macro and modify it? I don't need the highlight and select option, unless it is needed for the current email that is open when someone opens it to make the excel edits and saves the file.

The reason for the forward is that the email comes from an outside contractor and any details in the email need to be forwarded on to the next person for any instructions. This is basically an approval process where an outside contractor sends the email with attached files to an employee at my organziation, then the employee opens the file, saves it to their desktop, as well as saves a second copy as a pdf, then attaches both to the forwarding email to go to the next supervisor for final approval on both.

My macros are in Outlook for forwarding, and I have some in the excel file for saving etc.
 
Yes, that is all possible. If you know when you receive the mail (or start the macro) that you will be approving it and have a macro that marked it approved, it should be possible to use one macro (not knowing how you mark it approved could throw a wrench into it) - or, for a few more clicks, you could, open Excel verify it will be approved, then run excel macro to approve, save, forward and attach.
 
Well, I have a macro that simply throws an image of the signature into the excel file which serves as the approval. This first apprvoer sends the saved excel file to the supervisor, who then uses a similar macro to throw their signature in the same excel file in their respective approval field. It is at this point that I have set up a few macros to save the file as both a pdf and a separate file to save the file as excel. These all work well and they are based on userid to add some level of security. My on;ly sticking point is how to attach the updated excel file from the first approver to a forwarded email and remove the orignal attachment. I then need the second approver to be able to save the updated excel file with both approval signatures as both excel and pdf, and then attach them to an email to continue the forwarding without any of the original attachments, only the updated ones.
I can either do this using a brand new email, or I can use a forward. Right now, a forward is necessary only until I get all of the signatures uploaded. We do not use Notro or anything like that here, so in lieu of those options and my signature image, we have to include the word approved in the body of the email being forwarded, The excel and pdf still need to be created with this process, but the one place I'm stuck at is creating th new email and attaching updated files, which I think you provided, but more importnantly, how to forward the mail items multiple times always updating the attachments. I hope that make sense.
 
To copy files from one message to another, you need to use the windows scripting - not hard to do, but forward is generally easier. If you didn't want the forward header, you can get the body & subject from the original message - it'll look like a new message. Adding text to the message body is not hard either - you can use word object model and use insertbefore.

The first macro at Log Messages and Attachment Names uses insertbefore. You'd use a similar method to use excel's object model in outlook. (The second macro on the page just sends data to excel, it doesn't use Excel's object model.)

This opens and excel workbook - you just need to save the workbook and pass the path/filename to it.
Code:
Set oApp = CreateObject("Excel.Application")
oApp.Workbooks.Open FileName:=strPath
oApp.Visible = True

or use the method here - Save and Open an Attachment using VBA

A macro for Saving by file type is here - Save Attachments to the Hard Drive
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
M VBA to auto forward message with new subject and body text Outlook VBA and Custom Forms 8
A Creating an outlook rule to forward an email with a specific message Using Outlook 1
D Forward message to address from subject Outlook VBA and Custom Forms 1
J How to change From then forward message Outlook VBA and Custom Forms 1
S Reply & Forward Date in original message incorrect Using Outlook 2
J How to Reply or Forward a message and Archive it in same step? Using Outlook 0
M How to forward a message and delay sending for up to 30 days Using Outlook 8
K How to auto truncate a message to forward with Outlook Rules Using Outlook 6
D Outlook VBA forward the selected email to the original sender’s email ID (including the email used in TO, CC Field) from the email chain Outlook VBA and Custom Forms 2
A Forward mails with "FW:" or "RE:" in title Using Outlook 2
J Outlook 365 Forward Email Subject to my inbox when new email arrive in shared inbox Using Outlook 0
L Fetch, edit and forward an email with VBA outlook Outlook VBA and Custom Forms 2
D Outlook 365 Forward Meeting Related Messages to Specific Meeting Organizer Outlook VBA and Custom Forms 0
T Customized form: The Forward option shows write layout Outlook VBA and Custom Forms 0
richardwing Auto forward email that is moves into a specific outlook folder Outlook VBA and Custom Forms 5
Z VBA Forward vs manual forward Outlook VBA and Custom Forms 2
A Outlook 2016 Macro to Reply, ReplyAll, or Forward(but with composing new email) Outlook VBA and Custom Forms 0
F Forward incoming email with 4 embedded images in the body without original sender Outlook VBA and Custom Forms 22
David McKay VBA to manually forward using odd options Outlook VBA and Custom Forms 1
S Auto forward for multiple emails Outlook VBA and Custom Forms 0
G Forward email body to other mail list directly from Exchange server Exchange Server Administration 1
D auto forward base on email address in body email Outlook VBA and Custom Forms 0
Bering Forward selected email without the original email appended Outlook VBA and Custom Forms 0
C UDFs Reply vs Forward Outlook VBA and Custom Forms 3
M In Outlook Calendar remove the buttons: 'Today' and '<' (Back a day) and '>' (Forward a day) that are below the Ribbon and above the calendar display. Using Outlook 0
J Automatically forward email and apply template Outlook VBA and Custom Forms 0
O Forward a email with modified body Automatically. Outlook VBA and Custom Forms 0
C How to rename subject line and forward the email Outlook VBA and Custom Forms 2
R Error when trying to forward current email item Outlook VBA and Custom Forms 7
M Outlook macro to automate search and forward process Outlook VBA and Custom Forms 6
G Missing forward/replied icons Using Outlook 2
B Automatically Forward Emails and Remove/Replace All or Part of Body Outlook VBA and Custom Forms 8
M Forward Appointment as BCC with VBScript Outlook VBA and Custom Forms 7
B Forward every other email in Outlook 2013 Outlook VBA and Custom Forms 2
D Disable or hide "reply" and "reply to all" and "forward" in email from access vba Outlook VBA and Custom Forms 1
Sabastian Samuel HOW DO I FORWARD AN EMAIL WITH MACRO using an email that in the body of another email Outlook VBA and Custom Forms 3
C Don't forward duplicate Using Outlook 0
undercover_smother Automatically Forward All Sent Mail and Delete After Send Outlook VBA and Custom Forms 10
A Forward Outlook Email by Filtering using Macro Rule Outlook VBA and Custom Forms 44
I change subject and forward without FW: Outlook VBA and Custom Forms 4
C VBA to Forward e-mails from certain address and between certain times Outlook VBA and Custom Forms 1
J Forward Action in Form Outlook VBA and Custom Forms 1
J Auto Forward - Include Attachment and change Subject depending on original sender Outlook VBA and Custom Forms 3
K add pdf to every reply or forward Outlook VBA and Custom Forms 1
Brostin Forward a mail to the address listed in the email text Outlook VBA and Custom Forms 1
N Going Forward: Using Outlook 2016 for RSS Feeds Using Outlook 2
R changing FW: on forward Outlook VBA and Custom Forms 3
Z Auto Forward Using Outlook 4
N Outlook script to forward emails based on senders' address Outlook VBA and Custom Forms 2
S Merge Emails with attachments with inbox rule to forward Using Outlook 5

Similar threads

Back
Top