hi i have a bit of code that sends a saved file via outlook as an attachment,
the user opens the word document, fills in the user form i have created, presses an "ok" button, and then the document is saved as a delimited text file and then the saved file is e-mailed. this is a bit of code i am having trouble with ---
With oItem
.To =
.Subject = "New Contract Notification"
'Add the document as an attachment, you can use the .displayname property
'to set the description that's used in the message
.Attachments.Add Source:=ActiveDocument.FullName, Type:=olByValue, _
DisplayName:="Notification of new contract for the Contract Register"
.Send
End With
This is the bit of code that instructs outlook how and where to send the e-mail (from word). i wish to use the value of a list box - i.e. listbox1 as the parameter for ".To" - but if is simply as .To Listbox1 , the e-mail does not send! is there something i am doing wrong? is this possible?
Many thanks
the user opens the word document, fills in the user form i have created, presses an "ok" button, and then the document is saved as a delimited text file and then the saved file is e-mailed. this is a bit of code i am having trouble with ---
With oItem
.To =
.Subject = "New Contract Notification"
'Add the document as an attachment, you can use the .displayname property
'to set the description that's used in the message
.Attachments.Add Source:=ActiveDocument.FullName, Type:=olByValue, _
DisplayName:="Notification of new contract for the Contract Register"
.Send
End With
This is the bit of code that instructs outlook how and where to send the e-mail (from word). i wish to use the value of a list box - i.e. listbox1 as the parameter for ".To" - but if is simply as .To Listbox1 , the e-mail does not send! is there something i am doing wrong? is this possible?
Many thanks