Re: Outlook Voting Buttons
Outlook Form or Outlook UserForm?
If you add them at design time you can set the .Visible property via code to make them appear or not. Same with the text.
Re: Outlook Voting Buttons
Hi RobDog,
It is an Outlook form. Here is the code I have behind it at the moment:
VB Code:
Public strFile
Function Item_Send()
Dim strVersion
Set cmbType = _
Item.GetInspector.ModifiedFormPages.Item("Message").Controls("cmbType")
Set txtVersion = _
Item.GetInspector.ModifiedFormPages.Item("Message").Controls("txtVersion")
strVersion = txtVersion.Value
[Subject] = "Document " & cmbType.Value & " - " & strFile & " v" & strVersion
End Function
Sub cmdBrowseFile_Click()
Dim strFilePath
Dim fso, f
Dim strOrigBody
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "All Files|*.xls;*.doc"
objDialog.InitialDir = "Y:\Comshare\Procedures and Guides\Review\"
intResult = objDialog.ShowOpen
If intResult <> 0 Then
strFilePath = "<file://" & objDialog.FileName & ">"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(objDialog.FileName)
strFile = f.Name
strOrigBody = [Body]
[Body] = strFilePath & vbNewLine & _
vbNewLine & strOrigBody
End If
End Sub
Function Item_CustomAction(ByVal Action, ByVal NewItem)
'Dim oRecipient
'Dim olCc
'olCc = 2
'Set oRecipient = Item.Recipients.Add
'oRecipient.Address = "DMS"
'oRecipient.Type = olCc
'oRecipient.ResolveAll
Msgbox Action.Name
End Function
One of the things I also cannot get to work is the Item_CustomAction function so any help you can give with this would also be appreciated!
Thanks
David