Forum Moderators: open
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...
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...
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.