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 and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Reply / forward with a custom form.



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 24th 09, 01:54 PM posted to microsoft.public.outlook.program_vba
paul
external usenet poster
 
Posts: 197
Default Reply / forward with a custom form.

Hi,

I'm using Outlook 2003

I've created a custom form for internal communication to mail send to our
shared mailbox. This form is located on our network drive (saved as .oft).
I'm creating a custom (VBA) Userform to call the .oft mailformat via a
commandbutton. For a new e-mail this works great.

What I would like to achieve is a second button that can be clicked for
replying to a message using that same Custom form format. How would I do this
via VBA code.

I can reply to a message but it uses the standard e-mail format instead of
the custom I would like it to, this is the code I have so far;

Dim mynamespace As NameSpace
Dim myforward As MailItem
Dim myfolder

Set mynamespace = Application.GetNamespace("MAPI")
Set myfolder = mynamespace.GetDefaultFolder(6)

Set myforward = GetCurrentItem()

With myforward.Reply
..Display
End With

Any ideas?

Cheers,

Paul
Ads
  #2  
Old July 24th 09, 02:57 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default Reply / forward with a custom form.

This is a complicated scenario. You would have to use the same
CreateItemFromTemplate technique to create the new message from the template
*and* also call Reply to create a new reply message, copy all property
values from the reply message to the newly created message, and then call
Recipients.Add as many times as needed to copy all the recipients. I can't
imagine an .oft template that would have so much functionality to justify
that amount of work.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Paul" wrote in message
...
Hi,

I'm using Outlook 2003

I've created a custom form for internal communication to mail send to our
shared mailbox. This form is located on our network drive (saved as .oft).
I'm creating a custom (VBA) Userform to call the .oft mailformat via a
commandbutton. For a new e-mail this works great.

What I would like to achieve is a second button that can be clicked for
replying to a message using that same Custom form format. How would I do
this
via VBA code.

I can reply to a message but it uses the standard e-mail format instead of
the custom I would like it to, this is the code I have so far;

Dim mynamespace As NameSpace
Dim myforward As MailItem
Dim myfolder

Set mynamespace = Application.GetNamespace("MAPI")
Set myfolder = mynamespace.GetDefaultFolder(6)

Set myforward = GetCurrentItem()

With myforward.Reply
.Display
End With

Any ideas?

Cheers,

Paul



 




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
Form on Reply or Forward [email protected] Outlook - Using Forms 29 June 13th 09 07:12 PM
Disable Reply and Forward actions in custom form Kent C Outlook - Using Forms 1 December 31st 08 05:07 PM
Custom Form - Reply dread Outlook - Using Forms 0 June 30th 08 10:39 PM
Custom Reply Form cjohnson300 Outlook - Using Forms 12 March 15th 07 06:07 AM
forward event of Custom form cynthia Outlook - Using Forms 5 March 9th 07 02:37 PM


All times are GMT +1. The time now is 03:50 AM.


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.