|
-
May 3rd, 2006, 08:02 AM
#1
Thread Starter
New Member
Outlook Voting Buttons
Can anyone tell me how to add and control voting buttons on a custom form using VBScript? What I want to do is to automatically add voting buttons to my form when it is sent but dynamically because the button options may vary.
E.g. If the user selects "A" from the combo box on my form I want two voting buttons added to the e-mail when sent, if the user selects "B" from the combo box I want to add three voting buttons.
I have been using VBScript with the form not VBA.
Thanks
-
May 3rd, 2006, 01:34 PM
#2
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 4th, 2006, 01:40 AM
#3
Thread Starter
New Member
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
Last edited by RobDog888; May 4th, 2006 at 01:52 AM.
Reason: Added [vbcode] tags
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|