Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Manoj
Did you follow the example from the first link I posted? Here it is again. http://www.dicks-clicks.com/excel/olSending.htm look at the last two examples. You can't assign more than one value to the variable TT because it's a string variable. If you wanted to concatenate a bunch of cells into a string variable, you would have to use a loop, like this For Each cell in Range("A1:H57") TT = TT & cell.Text Next cell but you won't end up with a table in TT, just a bunch of text. And finally, don't post in all capital letters. It's difficult to read. -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "Manoj" wrote in message ... TKS FOR YOUR INFO, IN THE MACRO I MADE SOME CHANGE TO GET THE TEXT FROM THE SHEET TO THE OUTLOOK MESSAGE BODY. I WANT TO PULL WHOLE TEXT FROM SHEET (RANGE A1,H57) TO .BODY HOW TO GET IT DONE WHAT I TRIED IS DIM TT AS STRING TT = RANGE(D1).VALUE .BODY = TT IN THIS I TRIED CHANGING TT = RANGE(A1,H57).VALUE BUT GIVES ERROR I ERROR MAY BE IN ASSIGNING THE VARIABLE. EXPECT YR REPLY TKS IN ADVANCE MANOJ -----Original Message----- Manoj That error usually means that you did not set a reference to the Outlook Object Library. In the VBE, go to Tools - References and put a check mark next to Microsoft Outlook 9.0 Object Library. The 9.0 relates to Outlook 2000, so if you have a different version, your number may be different. That's the short answer, here's the long answer if you want more information about the process: http://www.dicks-clicks.com/excel/olBinding.htm -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "Manoj" wrote in message ... Dear Tks very much for your reply. I got the page you mentioned in your mail But when i tried in excel it is giving some errors "User defined function not defined..." for the first 3 line that is Dim olApp As Outlook.Application Dim olMail As MailItem Dim CurrFile As String I KNOW THAT IT IS NOT THE MACRO PROBLEM. I MADE SOME MISTAKE SOME WHERE. PREVIOUSLY ALSO WITH SOME OTHER CODES I GOT ALSO I FACED THE SAME PROBLEM. SINCE YOU ARE AN EXPERT IN THIS CAN YOU EXPLAIN ME STEP BY STEP WHAT TO DO AND WHY IAM GETTING THE ERROR MESSAGE. RGDS Manoj -----Original Message----- Manoj Here's a page that shows how to put an Excel sheet into the body of a message. http://www.dicks-clicks.com/excel/olSending.htm#Top -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "Manoj" wrote in message ... Tks for you reply. In excel it is easy to find out how it works but in outlook there is no macro recording and so no idea about how it works rgds manoj -----Original Message----- Manoj, Generally a straight copy paste will work for displayed data. To automate this you will need to instance outlook and use the outlook paste method. The resultant data will be an editable table withn outlook Steve "Manoj" wrote in message ... Hi, This is just to clear a doubt. It is possible to save the contents in the excel sheet as a text file. But is it possible to save excel file as outlook message. That is save from excel sheet to outlook mail Draft folder. I have created macro for making text file and from text iam taking manually to outlook and adding some more on that. If i can directly take that to outlook draft then it is more easy to amend and adjust. tks & rgds Manoj . . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
outlook/excel | Excel Discussion (Misc queries) | |||
custimized outlook today in outlook 2007 | Excel Discussion (Misc queries) | |||
excel open in outlook if outlook is running | Excel Discussion (Misc queries) | |||
Send to Outlook 2000 not Outlook Express | Excel Discussion (Misc queries) | |||
Outlook 2003 demo back to Outlook XP | Excel Discussion (Misc queries) |