Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default how to send a workbook shortcut as attachement in an e-mail from a userform

Dear experts,
I am working on a userform and I would like to put in
there a label - when the user clicks on it, an e-mail
message opens that has as an attachment the shortcut to a
certain workbook on a server.
The "to" field should be populated but the user should
have the possibility to change the names if he/she wants
to. Also the subject line should populated. There should
also be a little message in the body of the e-mail.

I do not know how to achieve this - could you please help
me?
Many thanks in advance!
Best regards,
Valeria
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default how to send a workbook shortcut as attachement in an e-mail from a userform

Hi Valeria

Try one of the examples on my SendMail page.
Post back if you need more help
http://www.rondebruin.nl/sendmail.htm


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Valeria" wrote in message ...
Dear experts,
I am working on a userform and I would like to put in
there a label - when the user clicks on it, an e-mail
message opens that has as an attachment the shortcut to a
certain workbook on a server.
The "to" field should be populated but the user should
have the possibility to change the names if he/she wants
to. Also the subject line should populated. There should
also be a little message in the body of the e-mail.

I do not know how to achieve this - could you please help
me?
Many thanks in advance!
Best regards,
Valeria



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default how to send a workbook shortcut as attachement in an e-mail from a userform

Hi Ron,
I have tried this but I still have problems: VBA claims it
can't find the file I want to attach. Actually the file I
want to attach is a shortcut to a file (I have created the
shortcut in the folder), might this be the problem?
Otherwise I am sure the path to the file is OK.

Many thanks in advance!
Best regards,
Valeria


Private Sub Label3_Click()

Application.OnKey "^{F11}", "Show_Userform"
'You must add a reference to the Microsoft outlook Library

Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "bla bla bla"
.Body = "bla bla bla"
.Attachments.Add ("\\server\Shortcut to my
file.xls")
.Display
End With
Set OutMail = Nothing
Set OutApp = Nothing

Me.Hide
End Sub

-----Original Message-----
Hi Valeria

Try one of the examples on my SendMail page.
Post back if you need more help
http://www.rondebruin.nl/sendmail.htm


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Valeria" wrote in

message ...
Dear experts,
I am working on a userform and I would like to put in
there a label - when the user clicks on it, an e-mail
message opens that has as an attachment the shortcut to

a
certain workbook on a server.
The "to" field should be populated but the user should
have the possibility to change the names if he/she wants
to. Also the subject line should populated. There should
also be a little message in the body of the e-mail.

I do not know how to achieve this - could you please

help
me?
Many thanks in advance!
Best regards,
Valeria



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default how to send a workbook shortcut as attachement in an e-mail from a userform

Why not fill in the real path to the file ??

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Valeria" wrote in message ...
Hi Ron,
I have tried this but I still have problems: VBA claims it
can't find the file I want to attach. Actually the file I
want to attach is a shortcut to a file (I have created the
shortcut in the folder), might this be the problem?
Otherwise I am sure the path to the file is OK.

Many thanks in advance!
Best regards,
Valeria


Private Sub Label3_Click()

Application.OnKey "^{F11}", "Show_Userform"
'You must add a reference to the Microsoft outlook Library

Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "bla bla bla"
.Body = "bla bla bla"
.Attachments.Add ("\\server\Shortcut to my
file.xls")
.Display
End With
Set OutMail = Nothing
Set OutApp = Nothing

Me.Hide
End Sub

-----Original Message-----
Hi Valeria

Try one of the examples on my SendMail page.
Post back if you need more help
http://www.rondebruin.nl/sendmail.htm


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Valeria" wrote in

message ...
Dear experts,
I am working on a userform and I would like to put in
there a label - when the user clicks on it, an e-mail
message opens that has as an attachment the shortcut to

a
certain workbook on a server.
The "to" field should be populated but the user should
have the possibility to change the names if he/she wants
to. Also the subject line should populated. There should
also be a little message in the body of the e-mail.

I do not know how to achieve this - could you please

help
me?
Many thanks in advance!
Best regards,
Valeria



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default how to send a workbook shortcut as attachement in an e-mail from a userform

Hi Ron,
because the e-mail would then have attached the file and
not the shortcut - I want people to update the file
directly on the server and not on their computer! Plus as
4 different people need to update it, if they do not work
on the same file they risk to make changes, and then save
the file to the folder again deleting the changes made by
somebody else.
Do you have any ideas how to do this?
Many thanks,
Valeria


-----Original Message-----
Why not fill in the real path to the file ??

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Valeria" wrote in

message ...
Hi Ron,
I have tried this but I still have problems: VBA claims

it
can't find the file I want to attach. Actually the file

I
want to attach is a shortcut to a file (I have created

the
shortcut in the folder), might this be the problem?
Otherwise I am sure the path to the file is OK.

Many thanks in advance!
Best regards,
Valeria


Private Sub Label3_Click()

Application.OnKey "^{F11}", "Show_Userform"
'You must add a reference to the Microsoft outlook

Library

Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "bla bla bla"
.Body = "bla bla bla"
.Attachments.Add ("\\server\Shortcut to my
file.xls")
.Display
End With
Set OutMail = Nothing
Set OutApp = Nothing

Me.Hide
End Sub

-----Original Message-----
Hi Valeria

Try one of the examples on my SendMail page.
Post back if you need more help
http://www.rondebruin.nl/sendmail.htm


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Valeria" wrote

in
message ...
Dear experts,
I am working on a userform and I would like to put in
there a label - when the user clicks on it, an e-mail
message opens that has as an attachment the shortcut

to
a
certain workbook on a server.
The "to" field should be populated but the user

should
have the possibility to change the names if he/she

wants
to. Also the subject line should populated. There

should
also be a little message in the body of the e-mail.

I do not know how to achieve this - could you please

help
me?
Many thanks in advance!
Best regards,
Valeria


.



.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default how to send a workbook shortcut as attachement in an e-mail from a userform

Hi Valeria

If you have a hyperlink to the file on the server on your worksheet.
then you can send it in the body of the mail.

http://www.rondebruin.nl/files/SelectionOutlookBody.txt



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Valeria" wrote in message ...
Hi Ron,
because the e-mail would then have attached the file and
not the shortcut - I want people to update the file
directly on the server and not on their computer! Plus as
4 different people need to update it, if they do not work
on the same file they risk to make changes, and then save
the file to the folder again deleting the changes made by
somebody else.
Do you have any ideas how to do this?
Many thanks,
Valeria


-----Original Message-----
Why not fill in the real path to the file ??

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Valeria" wrote in

message ...
Hi Ron,
I have tried this but I still have problems: VBA claims

it
can't find the file I want to attach. Actually the file

I
want to attach is a shortcut to a file (I have created

the
shortcut in the folder), might this be the problem?
Otherwise I am sure the path to the file is OK.

Many thanks in advance!
Best regards,
Valeria


Private Sub Label3_Click()

Application.OnKey "^{F11}", "Show_Userform"
'You must add a reference to the Microsoft outlook

Library

Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "bla bla bla"
.Body = "bla bla bla"
.Attachments.Add ("\\server\Shortcut to my
file.xls")
.Display
End With
Set OutMail = Nothing
Set OutApp = Nothing

Me.Hide
End Sub

-----Original Message-----
Hi Valeria

Try one of the examples on my SendMail page.
Post back if you need more help
http://www.rondebruin.nl/sendmail.htm


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Valeria" wrote

in
message ...
Dear experts,
I am working on a userform and I would like to put in
there a label - when the user clicks on it, an e-mail
message opens that has as an attachment the shortcut

to
a
certain workbook on a server.
The "to" field should be populated but the user

should
have the possibility to change the names if he/she

wants
to. Also the subject line should populated. There

should
also be a little message in the body of the e-mail.

I do not know how to achieve this - could you please
help
me?
Many thanks in advance!
Best regards,
Valeria


.



.



Reply
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
Bypass: A program is trying to send mail using Item.Send prompt Vick Excel Discussion (Misc queries) 1 June 25th 09 03:31 AM
How can i password secure a workbook when i send it via e-mail AN Excel Discussion (Misc queries) 6 April 2nd 08 11:17 PM
Send to mail recipient (as attachement) is greyed out Phan Excel Discussion (Misc queries) 2 May 18th 05 03:26 PM
Send as attachement Scott McDonald Excel Discussion (Misc queries) 0 April 25th 05 06:13 PM
Send a Userform by email Fede Querio Excel Programming 0 July 27th 03 11:06 PM


All times are GMT +1. The time now is 11:50 PM.

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"