Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel macro to attach files in Outlook 2000
Hi there,
Trying to get the VBA command in Excel macro below to add an attachment in Outlook 2000. The attachment needs to be read from a location in the Excel file. My friend used the command below but works for Outlook in XP and not in 2000 it seems. ..Attachments.Add CStr(ActiveCell.Offset(0, 4).Value) The Cstr thing doesn't seem to work in 2000. This is what I have so far: With olMyEmail .To = ActiveCell.Text .CC = ActiveCell.Offset(0, 1).Text .Subject = ActiveCell.Offset(0, 2).Text .Body = ActiveCell.Offset(0, 3).Text .Attachments.Add ----- NEED HELP HERE TO LOCATE FILE IN EXCEL CELL .Save End With Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel macro to attach files in Outlook 2000
I would try setting up an input to bring in the attachment destination. For
example: mynewattachment=range("A1").value 'or whereever the location is Then, i would try to attach it as follows (in place of .Attachments.Add in your code): Set myAttachments = OutMail.Attachments myAttachments.Add mynewattachment Hope this helps! -Chad " wrote: Hi there, Trying to get the VBA command in Excel macro below to add an attachment in Outlook 2000. The attachment needs to be read from a location in the Excel file. My friend used the command below but works for Outlook in XP and not in 2000 it seems. ..Attachments.Add CStr(ActiveCell.Offset(0, 4).Value) The Cstr thing doesn't seem to work in 2000. This is what I have so far: With olMyEmail .To = ActiveCell.Text .CC = ActiveCell.Offset(0, 1).Text .Subject = ActiveCell.Offset(0, 2).Text .Body = ActiveCell.Offset(0, 3).Text .Attachments.Add ----- NEED HELP HERE TO LOCATE FILE IN EXCEL CELL .Save End With Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I attach an Outlook email to an Excel cell? | Excel Discussion (Misc queries) | |||
Can you attach an alert to a date in excel(eg to outlook calendar | Excel Discussion (Misc queries) | |||
Automatically attach Excel spreadsheet to Outlook Email with Macro? | Excel Programming | |||
Sending tasks from Excel 2000 to Outlook 2000 | Excel Programming | |||
I want to attach word files or PDF files to an excel database | Excel Discussion (Misc queries) |