A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Voting Button



 
 
Thread Tools Search this Thread Display Modes
  #11  
Old May 3rd 06, 03:17 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Voting Button

Any chance that you have a duplicate event handler declaration? That would confuse matters so that the code below wouldn't run on your published form.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DavidW" wrote in message ...
Hi Paul,

I think I must be doing something completely wrong! I've added the following
code to try and capture the voting button event:

Function Item_CustomAction(ByVal Action, ByVal NewItem)

Msgbox Action.Name

End Function

But this does not fire, all I get is the default 'Do you want to edit the
message before sending' prompt. I am trying to capture the event so that I
can test adding the recipients. When I publish the form all of the other code
works just not the Msgbox.

Any ideas?

Thanks
David


Ads
  #12  
Old May 12th 06, 03:09 PM posted to microsoft.public.outlook.program_forms
DavidW
external usenet poster
 
Posts: 20
Default Voting Button

Hi Sue,

Here is the amended code in my form:

------------------------------------------------------------------------------
Public strFile

Function Item_Send()

Dim strVersion
Dim strUserName

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

Select Case cmbType.Text
Case "Change Request"
Item.VotingOptions = "Reject; Implement Immediately; Schedule
Implementation"
Case else
Item.VotingOptions = "Accept; Reject"
End Select

strUserName = Application.Session.CurrentUser.Name

Item.ReplyRecipients.Add "DMS"
Item.ReplyRecipients.Add strUserName

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

--------------------------------------------------------------------------------------

However, whenever the user clicks on any of the voting buttons the reply is
sent to the originator only and does not include the DMS user.

Thanks
David




"Sue Mosher [MVP-Outlook]" wrote:

You'd need to work with the ReplyRecipients collection, which works just like the main Recipients collection, e.g. to add two recipients:

Item.ReplyRecipients.Add ")
strUserAddress = Application.Session.CurrentUser.Address
If strUserAddress "" Then
Item.ReplyRecipients.Add strUserAddress
End If

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DavidW" wrote in message ...
I have created a custom form and am using VBScript to manipulate the objects
on the form. The form has voting buttons added to it automatically but what I
am having difficulty with is dynamically setting the 'Have replies sent to
option'. I would like responses sent to the originator and also to another
fixed address. Can someone please provide me with some sample VBScript code
that I could use to accomplish this task?

Thanks


  #13  
Old May 12th 06, 03:30 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Voting Button

Is this a form published to the Organizational Forms library?

Just curious: If the recipient does a regular reply to the message, rather than choosing a voting button, does it go to both recipients?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DavidW" wrote in message ...
Hi Sue,

Here is the amended code in my form:

------------------------------------------------------------------------------
Public strFile

Function Item_Send()

Dim strVersion
Dim strUserName

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

Select Case cmbType.Text
Case "Change Request"
Item.VotingOptions = "Reject; Implement Immediately; Schedule
Implementation"
Case else
Item.VotingOptions = "Accept; Reject"
End Select

strUserName = Application.Session.CurrentUser.Name

Item.ReplyRecipients.Add "DMS"
Item.ReplyRecipients.Add strUserName

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

--------------------------------------------------------------------------------------

However, whenever the user clicks on any of the voting buttons the reply is
sent to the originator only and does not include the DMS user.

Thanks
David




"Sue Mosher [MVP-Outlook]" wrote:

You'd need to work with the ReplyRecipients collection, which works just like the main Recipients collection, e.g. to add two recipients:

Item.ReplyRecipients.Add ")
strUserAddress = Application.Session.CurrentUser.Address
If strUserAddress "" Then
Item.ReplyRecipients.Add strUserAddress
End If

"DavidW" wrote in message ...
I have created a custom form and am using VBScript to manipulate the objects
on the form. The form has voting buttons added to it automatically but what I
am having difficulty with is dynamically setting the 'Have replies sent to
option'. I would like responses sent to the originator and also to another
fixed address. Can someone please provide me with some sample VBScript code
that I could use to accomplish this task?

Thanks


  #14  
Old May 12th 06, 04:43 PM posted to microsoft.public.outlook.program_forms
DavidW
external usenet poster
 
Posts: 20
Default Voting Button

Hi Sue,

The form is published to my Personal forms library and no, when I simply
reply the DMS user is not added to the recipients list.

Thanks
David

"Sue Mosher [MVP-Outlook]" wrote:

Is this a form published to the Organizational Forms library?

Just curious: If the recipient does a regular reply to the message, rather than choosing a voting button, does it go to both recipients?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DavidW" wrote in message ...
Hi Sue,

Here is the amended code in my form:

------------------------------------------------------------------------------
Public strFile

Function Item_Send()

Dim strVersion
Dim strUserName

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

Select Case cmbType.Text
Case "Change Request"
Item.VotingOptions = "Reject; Implement Immediately; Schedule
Implementation"
Case else
Item.VotingOptions = "Accept; Reject"
End Select

strUserName = Application.Session.CurrentUser.Name

Item.ReplyRecipients.Add "DMS"
Item.ReplyRecipients.Add strUserName

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

--------------------------------------------------------------------------------------

However, whenever the user clicks on any of the voting buttons the reply is
sent to the originator only and does not include the DMS user.

Thanks
David




"Sue Mosher [MVP-Outlook]" wrote:

You'd need to work with the ReplyRecipients collection, which works just like the main Recipients collection, e.g. to add two recipients:

Item.ReplyRecipients.Add ")
strUserAddress = Application.Session.CurrentUser.Address
If strUserAddress "" Then
Item.ReplyRecipients.Add strUserAddress
End If

"DavidW" wrote in message ...
I have created a custom form and am using VBScript to manipulate the objects
on the form. The form has voting buttons added to it automatically but what I
am having difficulty with is dynamically setting the 'Have replies sent to
option'. I would like responses sent to the originator and also to another
fixed address. Can someone please provide me with some sample VBScript code
that I could use to accomplish this task?

Thanks


  #15  
Old May 12th 06, 05:19 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Voting Button

If you type DMS into the To box of a message and try to send it, what happens? For best results, you should use the SMTP address or a unique string that points to that mailbox.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DavidW" wrote in message ...
Hi Sue,

The form is published to my Personal forms library and no, when I simply
reply the DMS user is not added to the recipients list.

Thanks
David

"Sue Mosher [MVP-Outlook]" wrote:

Is this a form published to the Organizational Forms library?

Just curious: If the recipient does a regular reply to the message, rather than choosing a voting button, does it go to both recipients?



"DavidW" wrote in message ...
Hi Sue,

Here is the amended code in my form:

------------------------------------------------------------------------------
Public strFile

Function Item_Send()

Dim strVersion
Dim strUserName

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

Select Case cmbType.Text
Case "Change Request"
Item.VotingOptions = "Reject; Implement Immediately; Schedule
Implementation"
Case else
Item.VotingOptions = "Accept; Reject"
End Select

strUserName = Application.Session.CurrentUser.Name

Item.ReplyRecipients.Add "DMS"
Item.ReplyRecipients.Add strUserName

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

--------------------------------------------------------------------------------------

However, whenever the user clicks on any of the voting buttons the reply is
sent to the originator only and does not include the DMS user.

Thanks
David




"Sue Mosher [MVP-Outlook]" wrote:

You'd need to work with the ReplyRecipients collection, which works just like the main Recipients collection, e.g. to add two recipients:

Item.ReplyRecipients.Add ")
strUserAddress = Application.Session.CurrentUser.Address
If strUserAddress "" Then
Item.ReplyRecipients.Add strUserAddress
End If

"DavidW" wrote in message ...
I have created a custom form and am using VBScript to manipulate the objects
on the form. The form has voting buttons added to it automatically but what I
am having difficulty with is dynamically setting the 'Have replies sent to
option'. I would like responses sent to the originator and also to another
fixed address. Can someone please provide me with some sample VBScript code
that I could use to accomplish this task?

Thanks


  #16  
Old May 15th 06, 10:18 AM posted to microsoft.public.outlook.program_forms
DavidW
external usenet poster
 
Posts: 20
Default Voting Button

Hi Sue,

When I type in DMS as you suggested, the e-mail is sent to the DMS mailbox.

Regards
David

"Sue Mosher [MVP-Outlook]" wrote:

If you type DMS into the To box of a message and try to send it, what happens? For best results, you should use the SMTP address or a unique string that points to that mailbox.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DavidW" wrote in message ...
Hi Sue,

The form is published to my Personal forms library and no, when I simply
reply the DMS user is not added to the recipients list.

Thanks
David

"Sue Mosher [MVP-Outlook]" wrote:

Is this a form published to the Organizational Forms library?

Just curious: If the recipient does a regular reply to the message, rather than choosing a voting button, does it go to both recipients?



"DavidW" wrote in message ...
Hi Sue,

Here is the amended code in my form:

------------------------------------------------------------------------------
Public strFile

Function Item_Send()

Dim strVersion
Dim strUserName

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

Select Case cmbType.Text
Case "Change Request"
Item.VotingOptions = "Reject; Implement Immediately; Schedule
Implementation"
Case else
Item.VotingOptions = "Accept; Reject"
End Select

strUserName = Application.Session.CurrentUser.Name

Item.ReplyRecipients.Add "DMS"
Item.ReplyRecipients.Add strUserName

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

--------------------------------------------------------------------------------------

However, whenever the user clicks on any of the voting buttons the reply is
sent to the originator only and does not include the DMS user.

Thanks
David




"Sue Mosher [MVP-Outlook]" wrote:

You'd need to work with the ReplyRecipients collection, which works just like the main Recipients collection, e.g. to add two recipients:

Item.ReplyRecipients.Add ")
strUserAddress = Application.Session.CurrentUser.Address
If strUserAddress "" Then
Item.ReplyRecipients.Add strUserAddress
End If

"DavidW" wrote in message ...
I have created a custom form and am using VBScript to manipulate the objects
on the form. The form has voting buttons added to it automatically but what I
am having difficulty with is dynamically setting the 'Have replies sent to
option'. I would like responses sent to the originator and also to another
fixed address. Can someone please provide me with some sample VBScript code
that I could use to accomplish this task?

Thanks



  #17  
Old May 16th 06, 02:57 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Voting Button

When you do it manually, are you letting Outlook resolve it or are you choosing an autocomplete entry? If the latter, delete the autocomplete entry and try again.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DavidW" wrote in message ...
Hi Sue,

When I type in DMS as you suggested, the e-mail is sent to the DMS mailbox.

Regards
David

"Sue Mosher [MVP-Outlook]" wrote:

If you type DMS into the To box of a message and try to send it, what happens? For best results, you should use the SMTP address or a unique string that points to that mailbox.

"DavidW" wrote in message ...
Hi Sue,

The form is published to my Personal forms library and no, when I simply
reply the DMS user is not added to the recipients list.

Thanks
David

"Sue Mosher [MVP-Outlook]" wrote:

Is this a form published to the Organizational Forms library?

Just curious: If the recipient does a regular reply to the message, rather than choosing a voting button, does it go to both recipients?



"DavidW" wrote in message ...
Hi Sue,

Here is the amended code in my form:

------------------------------------------------------------------------------
Public strFile

Function Item_Send()

Dim strVersion
Dim strUserName

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

Select Case cmbType.Text
Case "Change Request"
Item.VotingOptions = "Reject; Implement Immediately; Schedule
Implementation"
Case else
Item.VotingOptions = "Accept; Reject"
End Select

strUserName = Application.Session.CurrentUser.Name

Item.ReplyRecipients.Add "DMS"
Item.ReplyRecipients.Add strUserName

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

--------------------------------------------------------------------------------------

However, whenever the user clicks on any of the voting buttons the reply is
sent to the originator only and does not include the DMS user.

Thanks
David




"Sue Mosher [MVP-Outlook]" wrote:

You'd need to work with the ReplyRecipients collection, which works just like the main Recipients collection, e.g. to add two recipients:

Item.ReplyRecipients.Add ")
strUserAddress = Application.Session.CurrentUser.Address
If strUserAddress "" Then
Item.ReplyRecipients.Add strUserAddress
End If

"DavidW" wrote in message ...
I have created a custom form and am using VBScript to manipulate the objects
on the form. The form has voting buttons added to it automatically but what I
am having difficulty with is dynamically setting the 'Have replies sent to
option'. I would like responses sent to the originator and also to another
fixed address. Can someone please provide me with some sample VBScript code
that I could use to accomplish this task?

Thanks



  #18  
Old May 17th 06, 02:27 PM posted to microsoft.public.outlook.program_forms
DavidW
external usenet poster
 
Posts: 20
Default Voting Button

Hi Sue,

I am allowing Outlook to resolve it.


"Sue Mosher [MVP-Outlook]" wrote:

When you do it manually, are you letting Outlook resolve it or are you choosing an autocomplete entry? If the latter, delete the autocomplete entry and try again.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DavidW" wrote in message ...
Hi Sue,

When I type in DMS as you suggested, the e-mail is sent to the DMS mailbox.

Regards
David

"Sue Mosher [MVP-Outlook]" wrote:

If you type DMS into the To box of a message and try to send it, what happens? For best results, you should use the SMTP address or a unique string that points to that mailbox.

"DavidW" wrote in message ...
Hi Sue,

The form is published to my Personal forms library and no, when I simply
reply the DMS user is not added to the recipients list.

Thanks
David

"Sue Mosher [MVP-Outlook]" wrote:

Is this a form published to the Organizational Forms library?

Just curious: If the recipient does a regular reply to the message, rather than choosing a voting button, does it go to both recipients?


"DavidW" wrote in message ...
Hi Sue,

Here is the amended code in my form:

------------------------------------------------------------------------------
Public strFile

Function Item_Send()

Dim strVersion
Dim strUserName

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

Select Case cmbType.Text
Case "Change Request"
Item.VotingOptions = "Reject; Implement Immediately; Schedule
Implementation"
Case else
Item.VotingOptions = "Accept; Reject"
End Select

strUserName = Application.Session.CurrentUser.Name

Item.ReplyRecipients.Add "DMS"
Item.ReplyRecipients.Add strUserName

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

--------------------------------------------------------------------------------------

However, whenever the user clicks on any of the voting buttons the reply is
sent to the originator only and does not include the DMS user.

Thanks
David




"Sue Mosher [MVP-Outlook]" wrote:

You'd need to work with the ReplyRecipients collection, which works just like the main Recipients collection, e.g. to add two recipients:

Item.ReplyRecipients.Add ")
strUserAddress = Application.Session.CurrentUser.Address
If strUserAddress "" Then
Item.ReplyRecipients.Add strUserAddress
End If

"DavidW" wrote in message ...
I have created a custom form and am using VBScript to manipulate the objects
on the form. The form has voting buttons added to it automatically but what I
am having difficulty with is dynamically setting the 'Have replies sent to
option'. I would like responses sent to the originator and also to another
fixed address. Can someone please provide me with some sample VBScript code
that I could use to accomplish this task?

Thanks




  #19  
Old May 17th 06, 02:59 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Voting Button

Then I can't explain why it isn't working on a regular reply (leaving aside the voting button issue). A look at the received message with Outlook Spy or MFCMAPI might be revealing.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DavidW" wrote in message ...
Hi Sue,

I am allowing Outlook to resolve it.


"Sue Mosher [MVP-Outlook]" wrote:

When you do it manually, are you letting Outlook resolve it or are you choosing an autocomplete entry? If the latter, delete the autocomplete entry and try again.



"DavidW" wrote in message ...
Hi Sue,

When I type in DMS as you suggested, the e-mail is sent to the DMS mailbox.

Regards
David

"Sue Mosher [MVP-Outlook]" wrote:

If you type DMS into the To box of a message and try to send it, what happens? For best results, you should use the SMTP address or a unique string that points to that mailbox.

"DavidW" wrote in message ...
Hi Sue,

The form is published to my Personal forms library and no, when I simply
reply the DMS user is not added to the recipients list.

Thanks
David

"Sue Mosher [MVP-Outlook]" wrote:

Is this a form published to the Organizational Forms library?

Just curious: If the recipient does a regular reply to the message, rather than choosing a voting button, does it go to both recipients?


"DavidW" wrote in message ...
Hi Sue,

Here is the amended code in my form:

------------------------------------------------------------------------------
Public strFile

Function Item_Send()

Dim strVersion
Dim strUserName

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

Select Case cmbType.Text
Case "Change Request"
Item.VotingOptions = "Reject; Implement Immediately; Schedule
Implementation"
Case else
Item.VotingOptions = "Accept; Reject"
End Select

strUserName = Application.Session.CurrentUser.Name

Item.ReplyRecipients.Add "DMS"
Item.ReplyRecipients.Add strUserName

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

--------------------------------------------------------------------------------------

However, whenever the user clicks on any of the voting buttons the reply is
sent to the originator only and does not include the DMS user.

Thanks
David




"Sue Mosher [MVP-Outlook]" wrote:

You'd need to work with the ReplyRecipients collection, which works just like the main Recipients collection, e.g. to add two recipients:

Item.ReplyRecipients.Add ")
strUserAddress = Application.Session.CurrentUser.Address
If strUserAddress "" Then
Item.ReplyRecipients.Add strUserAddress
End If

"DavidW" wrote in message ...
I have created a custom form and am using VBScript to manipulate the objects
on the form. The form has voting buttons added to it automatically but what I
am having difficulty with is dynamically setting the 'Have replies sent to
option'. I would like responses sent to the originator and also to another
fixed address. Can someone please provide me with some sample VBScript code
that I could use to accomplish this task?

Thanks




  #20  
Old May 18th 06, 02:29 PM posted to microsoft.public.outlook.program_forms
DavidW
external usenet poster
 
Posts: 20
Default Voting Button

Hi Sue,

I think we must have crossed wires. To recap, if I create a normal e-mail
and send it to DMS the e-mail is delivered correctly to the DMS mailbox. If I
then access the DMS mailbox and reply to the message the response is
delivered correctly to my mailbox.

With the voting buttons, if I generate an e-mail and add voting buttons and
enter both my mail address and that of the DMS account into the 'Have replies
sent to' field on the Options page, when a voting button is selected the
response is sent to me and to DMS correctly.

The only time that this does not work is if I try to add the recipients
using VBScript.


Regards
David


"Sue Mosher [MVP-Outlook]" wrote:

Then I can't explain why it isn't working on a regular reply (leaving aside the voting button issue). A look at the received message with Outlook Spy or MFCMAPI might be revealing.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"DavidW" wrote in message ...
Hi Sue,

I am allowing Outlook to resolve it.


"Sue Mosher [MVP-Outlook]" wrote:

When you do it manually, are you letting Outlook resolve it or are you choosing an autocomplete entry? If the latter, delete the autocomplete entry and try again.



"DavidW" wrote in message ...
Hi Sue,

When I type in DMS as you suggested, the e-mail is sent to the DMS mailbox.

Regards
David

"Sue Mosher [MVP-Outlook]" wrote:

If you type DMS into the To box of a message and try to send it, what happens? For best results, you should use the SMTP address or a unique string that points to that mailbox.

"DavidW" wrote in message ...
Hi Sue,

The form is published to my Personal forms library and no, when I simply
reply the DMS user is not added to the recipients list.

Thanks
David

"Sue Mosher [MVP-Outlook]" wrote:

Is this a form published to the Organizational Forms library?

Just curious: If the recipient does a regular reply to the message, rather than choosing a voting button, does it go to both recipients?


"DavidW" wrote in message ...
Hi Sue,

Here is the amended code in my form:

------------------------------------------------------------------------------
Public strFile

Function Item_Send()

Dim strVersion
Dim strUserName

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

Select Case cmbType.Text
Case "Change Request"
Item.VotingOptions = "Reject; Implement Immediately; Schedule
Implementation"
Case else
Item.VotingOptions = "Accept; Reject"
End Select

strUserName = Application.Session.CurrentUser.Name

Item.ReplyRecipients.Add "DMS"
Item.ReplyRecipients.Add strUserName

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

--------------------------------------------------------------------------------------

However, whenever the user clicks on any of the voting buttons the reply is
sent to the originator only and does not include the DMS user.

Thanks
David




"Sue Mosher [MVP-Outlook]" wrote:

You'd need to work with the ReplyRecipients collection, which works just like the main Recipients collection, e.g. to add two recipients:

Item.ReplyRecipients.Add ")
strUserAddress = Application.Session.CurrentUser.Address
If strUserAddress "" Then
Item.ReplyRecipients.Add strUserAddress
End If

"DavidW" wrote in message ...
I have created a custom form and am using VBScript to manipulate the objects
on the form. The form has voting buttons added to it automatically but what I
am having difficulty with is dynamically setting the 'Have replies sent to
option'. I would like responses sent to the originator and also to another
fixed address. Can someone please provide me with some sample VBScript code
that I could use to accomplish this task?

Thanks





 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Voting Buttons & Excel Junoon Outlook and VBA 10 April 18th 06 06:09 AM
Voting button stanhope4 Outlook and VBA 6 April 13th 06 09:11 PM
Automation of voting buttons [email protected] Outlook - Using Forms 0 February 2nd 06 02:09 PM
How do I set up a voting buttons with hyperlink? Sunny Outlook - General Queries 1 January 24th 06 03:51 PM
Outlook 2003 Voting Problem [email protected] Outlook - General Queries 0 January 23rd 06 10:48 PM


All times are GMT +1. The time now is 12:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.