PC Review


Reply
Thread Tools Rate Thread

send e-mail code?

 
 
=?Utf-8?B?RmVsaXBl?=
Guest
Posts: n/a
 
      9th Nov 2005
I’m trying to build a form with build in buttons that will send and close the
form. They have to send the form to a predetermined e-mail and also have to
attend some requirement as the true value of an control. I have written some
codes in vba but they don’t work at all. The thing is that looks like the
buttons is not even linked to the code I wrote, I press it and nothing at all
happened. Here is an example;
My button to this code is named: enviardiretoria

Private Sub enviardiretoria_Click()
If CheckBox1 = True Then
Item.To = "(E-Mail Removed)"
Item.Send
End If
If checkbox2 = True Then
Item.To = TextBox21
Item.Send
End If
Close

End Sub

Please help me, thanks in advance

 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      9th Nov 2005
I'm confused. Outlook custom forms don't use VBA. THey use VBScript. So where did you actually write your code?

If this is an Outlook form, did you publish it?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Felipe" <(E-Mail Removed)> wrote in message news:7F90AE75-0B82-4B9D-9780-(E-Mail Removed)...
> I’m trying to build a form with build in buttons that will send and close the
> form. They have to send the form to a predetermined e-mail and also have to
> attend some requirement as the true value of an control. I have written some
> codes in vba but they don’t work at all. The thing is that looks like the
> buttons is not even linked to the code I wrote, I press it and nothing at all
> happened. Here is an example;
> My button to this code is named: enviardiretoria
>
> Private Sub enviardiretoria_Click()
> If CheckBox1 = True Then
> Item.To = "(E-Mail Removed)"
> Item.Send
> End If
> If checkbox2 = True Then
> Item.To = TextBox21
> Item.Send
> End If
> Close
>
> End Sub
>
> Please help me, thanks in advance
>

 
Reply With Quote
 
=?Utf-8?B?RmVsaXBl?=
Guest
Posts: n/a
 
      10th Nov 2005
weel I find that out yesterday but still O can't make everything work as I
wanted
to. One of the codes I'm traing to do is supost to send the e-mail to
someone if the checkbox is true or send back to the person that send the form
in the first place if the checkbox is false. The thing is that I can't write
the proper code that make it send back to the person that had send it in the
firt place. here is code I'm tring to use.
Function enviardiretoria_click()
if CheckBox1 = true then
item. to = "(E-Mail Removed)"
item.send
end if
if CheckBox1 = false then
item. to = ("de")
item.send
end if
End Function
Thanks
"Sue Mosher [MVP-Outlook]" escreveu:

> I'm confused. Outlook custom forms don't use VBA. THey use VBScript. So where did you actually write your code?
>
> If this is an Outlook form, did you publish it?
>
> --
> Sue Mosher, Outlook MVP
> Author of Configuring Microsoft Outlook 2003
> http://www.turtleflock.com/olconfig/index.htm
> and Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "Felipe" <(E-Mail Removed)> wrote in message news:7F90AE75-0B82-4B9D-9780-(E-Mail Removed)...
> > I’m trying to build a form with build in buttons that will send and close the
> > form. They have to send the form to a predetermined e-mail and also have to
> > attend some requirement as the true value of an control. I have written some
> > codes in vba but they don’t work at all. The thing is that looks like the
> > buttons is not even linked to the code I wrote, I press it and nothing at all
> > happened. Here is an example;
> > My button to this code is named: enviardiretoria
> >
> > Private Sub enviardiretoria_Click()
> > If CheckBox1 = True Then
> > Item.To = "(E-Mail Removed)"
> > Item.Send
> > End If
> > If checkbox2 = True Then
> > Item.To = TextBox21
> > Item.Send
> > End If
> > Close
> >
> > End Sub
> >
> > Please help me, thanks in advance
> >

>

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      10th Nov 2005
So this is custom form code? You can't just refer to a control as CheckBox1. You must use the proper Outlook syntax, which includes a reference to the page, as described at http://www.outlookcode.com/d/propsyntax.htm#unbound

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Felipe" <(E-Mail Removed)> wrote in message news:5258D5A7-B4D4-408F-865A-(E-Mail Removed)...
> weel I find that out yesterday but still O can't make everything work as I
> wanted
> to. One of the codes I'm traing to do is supost to send the e-mail to
> someone if the checkbox is true or send back to the person that send the form
> in the first place if the checkbox is false. The thing is that I can't write
> the proper code that make it send back to the person that had send it in the
> firt place. here is code I'm tring to use.
> Function enviardiretoria_click()
> if CheckBox1 = true then
> item. to = "(E-Mail Removed)"
> item.send
> end if
> if CheckBox1 = false then
> item. to = ("de")
> item.send
> end if
> End Function
> Thanks
> "Sue Mosher [MVP-Outlook]" escreveu:
>
>> I'm confused. Outlook custom forms don't use VBA. THey use VBScript. So where did you actually write your code?
>>
>> If this is an Outlook form, did you publish it?


>>
>> "Felipe" <(E-Mail Removed)> wrote in message news:7F90AE75-0B82-4B9D-9780-(E-Mail Removed)...
>> > I’m trying to build a form with build in buttons that will send and close the
>> > form. They have to send the form to a predetermined e-mail and also have to
>> > attend some requirement as the true value of an control. I have written some
>> > codes in vba but they don’t work at all. The thing is that looks like the
>> > buttons is not even linked to the code I wrote, I press it and nothing at all
>> > happened. Here is an example;
>> > My button to this code is named: enviardiretoria
>> >
>> > Private Sub enviardiretoria_Click()
>> > If CheckBox1 = True Then
>> > Item.To = "(E-Mail Removed)"
>> > Item.Send
>> > End If
>> > If checkbox2 = True Then
>> > Item.To = TextBox21
>> > Item.Send
>> > End If
>> > Close
>> >
>> > End Sub
>> >
>> > Please help me, thanks in advance
>> >

>>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with .send from microsoft example for vba send mail from excel code Mark Stephens Microsoft Excel Programming 4 3rd Feb 2010 01:27 PM
VBA code to send e-mail OldManEd Microsoft Access Reports 0 21st May 2008 01:08 AM
Receive and send mail thru vb code SRI Microsoft Outlook 2 19th Dec 2005 04:42 PM
Code to Send mail automatically... Sri Ram via OfficeKB.com Microsoft Outlook VBA Programming 0 2nd Mar 2005 10:13 AM
Send E-mail Through Vb.net code =?Utf-8?B?U3VubnkgSmluZGFs?= Microsoft Dot NET Framework 1 18th Jun 2004 03:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:38 PM.