Forum Moderators: open

Message Too Old, No Replies

Outlook plugin

add button in outlook menu

         

anibis

8:32 am on Jul 31, 2003 (gmt 0)

10+ Year Member



Hello

I want to create a user defined button in outlook using vb.
So, when a user clicks on the button that mail will be trapped.

Can any one help me in doing so?

Should I use MAPI or CDO?

Please help...

aspdaddy

11:54 am on Jul 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you want the button in the outlook application or on the mail message?

Mardi_Gras

11:54 am on Jul 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You might want to check out:

[cdolive.com...]

Another good resource would be:

[slipstick.com...]

anibis

12:45 pm on Jul 31, 2003 (gmt 0)

10+ Year Member



Yes, I want a button on outlook, and on clicking that button what ever email address I specify in "To" should be appended with a domain name and then the message should be send.

Example: In "To" I specify abc@abc.com and clicking the button it should be abc@abc.com.mydomain.com.
Now when user sends the mail it will traverse from mydomain to the specified mail accoint.

Please help...

aspdaddy

12:59 pm on Jul 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could add a button to the mail item easily enough (though you have to use a tab on this form)

sub CommandButton1_Click()
Item.To = Item.To & ".mydomain.com"
Item.Send()
end sub

anibis

6:58 am on Aug 6, 2003 (gmt 0)

10+ Year Member



I want to add a menu item after "File" in the existing menu of outlook.

This is the code I am using...

Implements IDTExtensibility2

Dim WithEvents oApp As Outlook.Application
Dim oCB As Office.CommandBarButton
Dim oCBs As Office.CommandBars
Dim oMenuBar As Office.CommandBar
Dim WithEvents oNS As Outlook.NameSpace
Dim WithEvents oOffCB As Office.CommandBarButton
Dim WithEvents oResetCB As Office.CommandBarButton
Dim oFolder As Outlook.MAPIFolder
Dim objNewMail As Outlook.MailItem
Dim varRecip As Variant
Dim varAttach As Variant
Dim blnResolveSuccess As Boolean
Dim WithEvents oItem As Outlook.Items
Dim retVal As Boolean
Dim clsAni As clsAniConnect

Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object, ByVal ConnectMode As _
AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
' This subroutine is called when your Add-in is connected
' to by the host application.
MsgBox "OnConnection called"
' Get the Application object for Outlook.
Set oApp = Application
' Get the Namespace.
Set oNS = oApp.GetNamespace("MAPI")
' Get a Folder to extend with the PropPage extension.
' Let the user pick the folder.
Set oFolder = oNS.PickFolder()
' Customize the Outlook Menu structure and toolbar.
Set oCBs = oApp.ActiveExplorer.CommandBars
Set oMenuBar = oCBs.Add("Ani Menu", 2, True, True)
oMenuBar.Visible = True
Set oMyControl = oMenuBar.Controls.Add(msoControlPopup, , , , True)
oMyControl.Caption = "Anirban"
oMyControl.Enabled = True
Set oResetCB = oMyControl.Controls.Add(Type:=msoControlButton, Temporary:=True, Before:=1)
oResetCB.Caption = "&Reset Menu"
oResetCB.Enabled = True
Set oOffCB = oMyControl.Controls.Add(Type:=msoControlButton, Temporary:=True, Before:=1)
oOffCB.Caption = "Ani Menu"
oOffCB.Enabled = True
End Sub

But it is not working.

Can any one tell me how to trap the TextField "To", "CC", "Subject", "BCC" and "Message" and "Attachment" area of outlook.
Actually I want to get access to these areas through my program.

How will I do this?

Please help...

aspdaddy

11:02 am on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The syntax to read or write the mailitem properties is as I put in the last post -

Item.<Property> = <value>

anibis

11:34 am on Aug 6, 2003 (gmt 0)

10+ Year Member



I actually want to append a menu in the existing menu of outlook.
The above code is creating a menu but its not appending it to the existing menu.

Can anyone help me?

anibis

9:37 am on Aug 16, 2003 (gmt 0)

10+ Year Member



I am able to add a combo box in menu and in tool bar and i am able to trap the events of the combobox also.

Now, I want to trap the form fields like "To", "BCC", "CC", "Subject" of the default mail form of outlook 2000 or 2002.

I am writing it in VB not in VBA.

Actually I want to append my domain name with the "TO".

Example: suppose user sends mail to abc@abc.com. so in "To" he writes abc@abc.com. I want to append my domain name after abc.com like abc@abc.com.mydomain.com.

Can any one help me.