Outlook 2007 Forms Assistance

Status
Not open for further replies.
J

Julius Perkins

I hope I'm posting this in the correct forum group...

I need help viewing & editing specific forms in Outlook. I essentially want to look at the existing 'Reply' and 'Reply to All' forms, make a copy of the existing 'Forward' form, save it under a new name, make some minor edits to it & incorporate it in such a way that will make it available for all current and new emails. My aim is to tweak the Forward action slightly, so that it includes the original recipients in the To & CC fields (just like 'Reply' & 'Reply to All') & pre-pends 'RE' instead of 'FW' in the subject line. That's it! I then need to create a new button on the quick access toolbar or the ribbon, if someone can link me to some documentation on how to modify the ribbon.

I'm not looking to be spoon-fed and am more than willing to read up on how to do this, but have not had much luck constructing my Google search in such a way that will help me locate the documentation I need.

If you must know why I'm asking, please read on.

We're trying to accommodate the ever popular request: 'Reply with Attachment' & 'Reply to All w/ Attachment' buttons in Outlook. Take the following real-world scenario using identical Windows XP systems & the Office 2007 Enterprise Suite:

1 - Sender sends an email to Recipient that contains an attachment of a document that needs to be reviewed.

2 - Recipient receives the email, double clicks it to open it (assume they don't use the Reading Pane), double click the document to open it, makes edits to it, clicks saves & closes the attachment.

3 - Recipient closes the email the opened from the sender (remember, we opened it to read it then opened the attachment), and receives the following prompt: "The attachments of the message "SUBJECT" have been changed. Do you want to save changes to this message?"

4 - Recipient clicks 'Yes', which updates the email with the modified version of the attachment, and now wants to be able to click a button that will reply to the recipient with the modified attachment.

This is what I've found so far:

1 - Clicking 'Forward' on an email containing an attachment will result in a new email being created, with blank TO, CC & BCC fields, a 'FW' prepended to the subject, the original email body contents and the attachment.

2 - So, clearly Outlook is capable of passing an/the attachment/s on to a new email. I checked the form actions (Open Email > Developer > Design This Form > (Actions) tab) and found 4 actions: Reply, Reply to All, Forward & Reply to Folder.

3 - Comparing the 'Forward', 'Reply' & 'Reply to All' actions reveal that the 'Address form like a:' values are 'Forward', 'Reply', 'Reply to All' respectively.

4 - This, to me, suggests there may be a [VB(?)] Function or some other form that it refers to when performing said '(Action)'. These are the forms or funtions I'm trying to view in an attempt to modify it in such a way that will result in the creation of a new option under the 'Address form like a:' field that can be used for any new '(Actions)' on the forms.

5 - After that it's just a matter of creating a button that a user can click to perform said action.

In 2007, when you open a Word attachment (and possibly others; I've not tested with Excel, PowerPoint etc.), edit it, click save (not save as) then close the document, the new changes are saved to a temp file in randomly named folder within:

%userprofile%\locals~1\tempor~1\content.outlook\

One is not prompted to choose a save location unless they perform a Save As; We're dealing with users here, not IT people, who instincitvely click "Save". Following the real-world example above, why would Outlook behave this way (ask you to save it back to the original email) if there's no way to Reply with the attachment directly to the sender in a single action? If the the Microsoft Developers were operating on the pretense that one should create a new email to send the now modified attachment back to the sender, why would Outlook care to look at that file? In most cases you don't want to modify the original, so why ask the user if they do? (These are rhetorical questions but if you have a good answer I'll listen!) I don't know why it was designed this way, but it is what it is and I'm running with it!

Lastly, just to say it: I've read a number of forums where several resopnses are arguments stating this is pointless because "the sender already has a copy of the attachment, why would they need it again" etc. This I understand wholly and to a certain extent agree. Having said this, please refrain from contributing by posting such comments as we're already aware of these users' idiosyncrasies. .
 
There is no Reply, Reply to All, or Forward form. All are messages and, as

such, use the default message form. Adding another action and some code

behind a message form to implement the behavior you want would require

substituting a custom form for the default message form -- but that may

cause problems with attachments on messages sent outside the organization. I

can't recommend that approach.

To reply with attachments can be done with a VBA solution. See

http://www.outlookcode.com/codedetail.aspx?id=1228 for sample code. The More

Commands command on the QAT drop-down will give you access to macros so you

can add them to the QAT. If you need to make this available to a lot of

people, an add-in would provie a better solution than VBA, however, as there

is no practical distribution method for VBA code.

Sue Mosher

"Julius Perkins" <julius[dot]perkins[at]aporter[dot]com> wrote in message

news:Ofo7KUSyJHA.4116@TK2MSFTNGP04.phx.gbl...
> I hope I'm posting this in the correct forum group...

> I need help viewing & editing specific forms in Outlook. I essentially
> want to look at the existing 'Reply' and 'Reply to All' forms, make a copy
> of the existing 'Forward' form, save it under a new name, make some minor
> edits to it & incorporate it in such a way that will make it available for
> all current and new emails. My aim is to tweak the Forward action
> slightly, so that it includes the original recipients in the To & CC
> fields (just like 'Reply' & 'Reply to All') & pre-pends 'RE' instead of
> 'FW' in the subject line. That's it! I then need to create a new button on
> the quick access toolbar or the ribbon, if someone can link me to some
> documentation on how to modify the ribbon.

> We're trying to accommodate the ever popular request: 'Reply with
> Attachment' & 'Reply to All w/ Attachment' buttons in Outlook. Take the
> following real-world scenario using identical Windows XP systems & the
> Office 2007 Enterprise Suite:

> 1 - Sender sends an email to Recipient that contains an attachment of a
> document that needs to be reviewed. 2 - Recipient receives the email,
> double clicks it to open it (assume they don't use the Reading Pane),
> double click the document to open it, makes edits to it, clicks saves &
> closes the attachment. 3 - Recipient closes the email the opened from the
> sender (remember, we opened it to read it then opened the attachment), and
> receives the following prompt: "The attachments of the message "SUBJECT"
> have been changed. Do you want to save changes to this message?" 4 -
> Recipient clicks 'Yes', which updates the email with the modified version
> of the attachment, and now wants to be able to click a button that will
> reply to the recipient with the modified attachment.

> This is what I've found so far:
> 1 - Clicking 'Forward' on an email containing an attachment will result in
> a new email being created, with blank TO, CC & BCC fields, a 'FW'
> prepended to the subject, the original email body contents and the
> attachment. 2 - So, clearly Outlook is capable of passing an/the
> attachment/s on to a new email. I checked the form actions (Open Email

> Developer > Design This Form > (Actions) tab) and found 4 actions: Reply,
> Reply to All, Forward & Reply to Folder. 3 - Comparing the 'Forward',
> 'Reply' & 'Reply to All' actions reveal that the 'Address form like a:'
> values are 'Forward', 'Reply', 'Reply to All' respectively. 4 - This, to
> me, suggests there may be a [VB(?)] Function or some other form that it
> refers to when performing said '(Action)'. These are the forms or funtions
> I'm trying to view in an attempt to modify it in such a way that will
> result in the creation of a new option under the 'Address form like a:'
> field that can be used for any new '(Actions)' on the forms. 5 - After
> that it's just a matter of creating a button that a user can click to
> perform said action.
 
Sue,

Thank you for taking the time to not only read through my post & providing some feedback, but to also provide a response that should perform this wacky action.

Somehow, last night I came came up with the following that should accomplish this task. It works on my machine & one other so give it a go!

------SNIP----
Public Sub ReplyWithAttach()

'Make declarations

Dim myOlApp As Outlook.Application

Dim myInspector As Outlook.Inspector

Dim myItem As Outlook.MailItem

Dim myReplyItem As Outlook.MailItem

Dim myAttachments As Outlook.Attachments

Dim myReplyAttachments As Outlook.Attachments

Dim fso

Dim TempFolder As String

Set fso = CreateObject("Scripting.FileSystemObject")

TempFolder = fso.GetSpecialFolder(2)

Set myOlApp = CreateObject("Outlook.Application")

Set myInspector = myOlApp.ActiveInspector

'Create variable to store files names 10 max if you need more then 10, change the value below

Dim filenames(10) As String

If Not TypeName(myInspector) = "Nothing" Then

If TypeName(myInspector.CurrentItem) = "MailItem" Then

Set myItem = myInspector.CurrentItem

Set myAttachments = myItem.Attachments

If myAttachments.Count > 0 Then

For Count = 1 To myAttachments.Count

myAttachments.Item(Count).SaveAsFile "c:\" & myAttachments.Item(Count).DisplayName

filenames(Count) = myAttachments.Item(Count).DisplayName

Next

Set myItem = myInspector.CurrentItem

Set myReplyItem = myItem.Reply

Set myReplyAttachments = myReplyItem.Attachments

For Count = 1 To myAttachments.Count

myReplyAttachments.Add "c:\" & filenames(Count), olByValue, 1, ""

' Its questionable whether the double quotes above are needed.

myReplyItem.Display

fso.DeleteFile "c:\" & filenames(Count)

Next

End If

Else

MsgBox "The item is of the wrong type."

End If

End If

End Sub

------SNIP----
Its a bit clumsy but it works :) (Hey, I'm a VBA/VBScript, WMI, ADSI work in progress.)

I tried substituting myItem.Reply with myItem.ReplyAll, however it didn't seem to behave correctly; in fact it didn't work at all. I'd be interesting in hearing why if you can figure it out.

Thanks for your code. We'll give that a shot. While we won't be releasing this to the masses, it would be a suppore nightmare, its nice to know that should our stance change, we're much better off with your help.

Thank you immensely again!

Jules.
 
What exactly happens when you step through the code with myItem.ReplyAll?

Sue Mosher

"Julius Perkins" <julius[dot]perkins[at]aporter[dot]com> wrote in message

news:e6uyqTayJHA.1196@TK2MSFTNGP03.phx.gbl...
> Sue,
> Thank you for taking the time to not only read through my post & providing
> some feedback, but to also provide a response that should perform this
> wacky action.

> Somehow, last night I came came up with the following that should
> accomplish this task. It works on my machine & one other so give it a go!
> ------SNIP----> Public Sub ReplyWithAttach()
> 'Make declarations
> Dim myOlApp As Outlook.Application
> Dim myInspector As Outlook.Inspector
> Dim myItem As Outlook.MailItem
> Dim myReplyItem As Outlook.MailItem
> Dim myAttachments As Outlook.Attachments
> Dim myReplyAttachments As Outlook.Attachments
> Dim fso
> Dim TempFolder As String
> Set fso = CreateObject("Scripting.FileSystemObject")
> TempFolder = fso.GetSpecialFolder(2)
> Set myOlApp = CreateObject("Outlook.Application")
> Set myInspector = myOlApp.ActiveInspector

> 'Create variable to store files names 10 max if you need more then 10,
> change the value below
> Dim filenames(10) As String

> If Not TypeName(myInspector) = "Nothing" Then
> If TypeName(myInspector.CurrentItem) = "MailItem" Then
> Set myItem = myInspector.CurrentItem
> Set myAttachments = myItem.Attachments
> If myAttachments.Count > 0 Then
> For Count = 1 To myAttachments.Count
> myAttachments.Item(Count).SaveAsFile "c:\" &
> myAttachments.Item(Count).DisplayName
> filenames(Count) = myAttachments.Item(Count).DisplayName
> Next

> Set myItem = myInspector.CurrentItem
> Set myReplyItem = myItem.Reply
> Set myReplyAttachments = myReplyItem.Attachments

> For Count = 1 To myAttachments.Count
> myReplyAttachments.Add "c:\" & filenames(Count), olByValue, 1, ""
> ' Its questionable whether the double quotes above are needed.
> myReplyItem.Display
> fso.DeleteFile "c:\" & filenames(Count)
> Next

> End If
> Else
> MsgBox "The item is of the wrong type."
> End If
> End If
> End Sub
> ------SNIP----
> Its a bit clumsy but it works :) (Hey, I'm a VBA/VBScript, WMI, ADSI work
> in progress.)
> I tried substituting myItem.Reply with myItem.ReplyAll, however it didn't
> seem to behave correctly; in fact it didn't work at all. I'd be
> interesting in hearing why if you can figure it out.

> Thanks for your code. We'll give that a shot. While we won't be
> releasing this to the masses, it would be a suppore nightmare, its nice to
> know that should our stance change, we're much better off with your help.

> Thank you immensely again!

> Jules.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
M Workarounds for sharing custom Outlook 2007 forms? Using Outlook 3
T Outlook 2007 forms: Check boxes and free text boxes not retaining data Using Outlook 1
G Outlook 2007 Forms Compatibility Issues Using Outlook 0
F can I use Outlook 2007 to create peer review/approve/reject forms Outlook VBA and Custom Forms 1
A Outlook 2007 forms Outlook VBA and Custom Forms 1
D Outlook 2007 Recovering E-Mails Using Outlook 0
W Transfer Outlook 2016 autocomplete file to Outlook 2007 Using Outlook 1
C Outlook 2007 Removing then adding account restores junk email processing Using Outlook 0
S Outlook 2007 crash linked to gdiplus.dll Using Outlook 0
S Outlook 2007 - Automatic purge fail Using Outlook 0
J outlook 2007 doesn't let me choose which .pst to search Using Outlook 2
D Outlook 2007 vs. Outlook 2010 -- ToDo Bar Using Outlook 0
D Outlook 2007 on 365 Using Outlook.com accounts in Outlook 2
S Macro for other actions - Outlook 2007 Outlook VBA and Custom Forms 23
S Verwendung von Outlook 2007 Using Outlook 0
A Arthur needs help with 2007 Outlook e-mail Using Outlook.com accounts in Outlook 3
M PST import from Outlook 2007 to 2010 - Address Book contacts all in 1 group Using Outlook 4
S outlook 2007 calendar search Using Outlook 6
B Migrate Outlook 2007 to Office 365 Using Outlook 3
X I have met my waterloo trying to resolve embedded graphics problem with outlook 2007 and now 2016 Using Outlook 1
R Outlook 2007 only loads some appointments Using Outlook 0
C Move Outlook 2007 to new PC with Outlook 365 Using Outlook 3
J Outlook 2007 Hide Messages Option not Available Using Outlook 2
S Outlook 2007 Calendar instant search problem. Windows 7 Using Outlook 4
S Outlook 2007 Calendar instant search problem. Windows 7 Using Outlook 0
B Server errors Outlook 2007 Using Outlook 1
S Reboot of frozen windows7 results in changed outlook 2007 settings Using Outlook 1
S Outlook 2007 printing wrong email address at top of page Using Outlook 8
M Configure outlook 2007 to accept digital signatures Using Outlook 2
D Outlook 2007 crashes when opening an email Using Outlook 2
R New chap saying hello and needing advice on Outlook 2007 thumbnails Using Outlook 3
icacream From Outlook 2007 to 2016 ! Using Outlook 9
vodkasoda Object could not be found Error in Outlook 2007 Outlook VBA and Custom Forms 5
S Outlook 2007: Address Cards allow entering text! Why? Using Outlook 3
S View Appointment in Text Wrap in Outlook 2007 Month Calendar View Using Outlook 0
L Outlook 2007 Separate the Send/Receive functions Using Outlook 2
M Outlook 2007 Contacts Glitch: Creating a new email Using Outlook 1
C Move from Outlook 2007 Enterprise (MOE) to Outlook Pro plus 2007 Using Outlook 1
J reinstalling Outlook 2007 asking for user name & password Using Outlook 14
P outlook addin unloaded in office 2007 Using Outlook 0
B Fonts in Outlook 2007 Using Outlook 4
R Add Exchange Account to existing POP3 Outlook 2007 Profile Using Outlook 0
C out of space in file group Outlook 2007 Using Outlook 2
A Moving archived contents in Outlook 2007 back into working folders Using Outlook 0
P Outlook 2007 Email Categorization using VBA Outlook VBA and Custom Forms 1
M Unable to Configure Gmail Account in Outlook 2007 Using Outlook 1
R Outlook 2007 or 2010 - Lock Down Functionality Outlook VBA and Custom Forms 3
S Outlook 2007, windows 10 Font size Using Outlook 1
Diane Poremsky Manually create a POP3 account in Outlook 2007 Using Outlook 0
J Can Click to Drag Custom Form Field But Cannot Drop When Designing in Outlook 2007 Outlook VBA and Custom Forms 2

Similar threads

Back
Top