Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 03-23-2015, 08:00 AM
gmayor's Avatar
gmayor gmayor is offline Outlook macro to check a value of a cell in an attachment and send an email based on that value Windows 7 64bit Outlook macro to check a value of a cell in an attachment and send an email based on that value Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Did you change the values (repeated below) to reflect what you have? You said that the workbook attachment always has the same name, so put that name where shown below. The other values reflect values I cannot know without seeing the workbook, so change those as required.


Const strWorkBook As String = "WorkBookName.xlsx" 'The name of the attached workbook
Const strSheet As String = "Sheet1" 'The name of the worksheet to process
Const strCell As String = "B1" 'The cell to process
Const iCount As Integer = 20 'The threshold value of the above cell
Const strMessage As String = "This is the reply message body text."

The message created was a reply to the message received with the attachment, so the recipient will be the sender of that message. I take it that you want to send it on to others rather than reply? If that is the case, change the lines

Set olMail = olItem.Reply
With olMail

to

Set olMail = olItem.Forward
With olMail
.To = "someone@somewhere.com; someoneelse@somewhereelse.com"

where the recipients are the addresses in bold, separated by semi-colons.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook macro to check a value of a cell in an attachment and send an email based on that value Create macro program to automatically email outlook with a visible cell range BillMaintenance Excel Programming 19 03-11-2015 03:19 PM
Can anyone here tweek this macro for renaming Excel files based on a cell's contents? chrisd2000 Excel Programming 6 07-01-2014 01:53 PM
Email alert based on value in cell sweetcuda Excel 0 03-12-2014 12:44 PM
Outlook macro to check a value of a cell in an attachment and send an email based on that value Command button - save in temp folder and send email with attachment bigbird69 Word VBA 13 11-18-2012 10:06 PM
Macro based on cell value ubns Excel Programming 1 05-07-2012 04:03 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft