LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro works in one workbook but not in another


This program will take a sheet and send it as an embedded email. It
works perfectly in a workbook with worksheets (sheet1)(sheet2)(sheet3)

For some reason when I enter this code into a workbook I actually need
to use it for whos worksheet name is (Recap) it sends the email just
fine BUT the contents of the mail are blank. In other words it does
not show the worksheet.

Any ideas?


Sub Mail_ActiveSheet_Body()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
..To = "
..CC = ""
..BCC = ""
..Subject = "This is the Subject line"
..HTMLBody = RangetoHTML2
..Send 'or use .Display
End With
Application.ScreenUpdating = True
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=505316

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel workbook wants to open with Works garwein Excel Discussion (Misc queries) 1 October 5th 09 01:35 AM
formula that works in a different workbook Jude Reason Excel Worksheet Functions 5 January 21st 07 03:34 PM
Macro for filter on protected workbook that works for all sheets, no matter what sheets are named? StargateFanFromWork[_3_] Excel Programming 6 January 26th 06 06:31 PM
Runtime error for macro that works in workbook created in Crystal Excel Discussion (Misc queries) 1 June 22nd 05 08:43 PM
My workbook doesn't works on no other PC exept mine.... Keith Willshaw Excel Programming 1 August 1st 03 04:46 PM


All times are GMT +1. The time now is 11:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"