Thread
:
change default e-mail form
View Single Post
#
7
May 9th 06, 04:43 PM posted to microsoft.public.outlook.program_vba
Nader
external usenet poster
Posts: 29
change default e-mail form
Hello,
thanks for the help. I've created an add-in with vb6 and I've tried to send
an email with outlook. When I send the email I get an error : "argument not
optional".
the code :
Private Sub objOLApp_ItemSend(ByVal Item As Object, Cancel As Boolean)
On Error GoTo errMsgBox
Dim p As Outlook.UserProperty
Set p = Item.UserProperties("Body")
If p Is Nothing Then
Set p = Item.UserProperties.Add("Body")
End If
p.Value = "huhu"
errMsgBox:
MsgBox Err.Description
End Sub
thanks in advance.
"Michael Bauer" a écrit dans le message de news:
...
Am Tue, 2 May 2006 18:50:47 +0200 schrieb Nader:
That´s VBA, not VBScript for custom forms. Yes, you could also create
Add-Ins and use that code.
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
--
www.vbOffice.net
--
Is this the vbscript code that should go into the form ? Or is it
possible
to create an addin that will caputre the send event and the text to the
body
of the message I'm sending.
thanks.
"Michael Bauer" a écrit dans le message de news:
...
Am Mon, 1 May 2006 13:23:17 +0200 schrieb Nader:
Sample:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
Boolean)
On Error Resume Next
Dim p as Outlook.UserProperty
Set p=Item.UserProperties("property_name")
If p Is Nothing Then
Set p=Item.UserProperties.Add("property_name")
Endif
p.value="huhu"
End Sub
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
--
www.vbOffice.net
--
Thanks. So what would be the best way then to do what I want ?
thanks.
"Michael Bauer" a écrit dans le message de news:
...
Am Fri, 28 Apr 2006 11:00:35 +0200 schrieb Nader:
I wouldn´t modify the form for that, but in the ItemSend event add a
field
to the UserProperties collection.
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
--
www.vbOffice.net
--
Hello,
I'd like to modifiy the default e-mail form (outlook 2002) so
whenever
I
send an e-mail I can add some text automatically without user being
able
to
see it.
thanks in advance.
Nader
View Public Profile
View message headers
Find all posts by Nader
Find all threads started by Nader
Ads