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

Code Button to Copy Standard Text in Memo (message) Field



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 18th 09, 03:28 PM posted to microsoft.public.outlook.program_forms
Delnang
external usenet poster
 
Posts: 23
Default Code Button to Copy Standard Text in Memo (message) Field

I am looking for the code I could use behind a macro button that would
basically copy a sentence or two into the message (memo) field.

What I am hoping for is that I send a form to an employee... if they agree
with the content, they can click a button which would then paste a standard
statement "I agree to the above terms and conditions" to the mail message.

Thank you in advance,
Angie


Ads
  #2  
Old September 18th 09, 04:27 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default Code Button to Copy Standard Text in Memo (message) Field

Are you able to publish forms to the Organizational Forms library on your
company's Exchange server? If not, then this project is not feasible. If so,
then please provide information about the Outlook version and whether these
would be plain text, HTML, or RTF format messages?

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


"Delnang" wrote in message
...
I am looking for the code I could use behind a macro button that would
basically copy a sentence or two into the message (memo) field.

What I am hoping for is that I send a form to an employee... if they agree
with the content, they can click a button which would then paste a
standard
statement "I agree to the above terms and conditions" to the mail message.

Thank you in advance,
Angie




  #3  
Old September 18th 09, 05:35 PM posted to microsoft.public.outlook.program_forms
Delnang
external usenet poster
 
Posts: 23
Default Code Button to Copy Standard Text in Memo (message) Field

Sue,
Thank you for your response. Yes, I am able to publish these forms to the
Organizational Forms library on our company's Exchange server. We are using
Outlook 2003. The message format type would be determined by the users
default which means it could be any of these three.

Thanks,
Angie

"Sue Mosher [MVP]" wrote:

Are you able to publish forms to the Organizational Forms library on your
company's Exchange server? If not, then this project is not feasible. If so,
then please provide information about the Outlook version and whether these
would be plain text, HTML, or RTF format messages?

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


"Delnang" wrote in message
...
I am looking for the code I could use behind a macro button that would
basically copy a sentence or two into the message (memo) field.

What I am hoping for is that I send a form to an employee... if they agree
with the content, they can click a button which would then paste a
standard
statement "I agree to the above terms and conditions" to the mail message.

Thank you in advance,
Angie





  #4  
Old September 18th 09, 05:42 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default Code Button to Copy Standard Text in Memo (message) Field

Is Word the email editor? Or the native Outlook editor? Do you care if the
formatting is flattened if the message format is RTF?
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Delnang" wrote in message
...
Sue,
Thank you for your response. Yes, I am able to publish these forms to the
Organizational Forms library on our company's Exchange server. We are
using
Outlook 2003. The message format type would be determined by the users
default which means it could be any of these three.

Thanks,
Angie

"Sue Mosher [MVP]" wrote:

Are you able to publish forms to the Organizational Forms library on your
company's Exchange server? If not, then this project is not feasible. If
so,
then please provide information about the Outlook version and whether
these
would be plain text, HTML, or RTF format messages?

"Delnang" wrote in message
...
I am looking for the code I could use behind a macro button that would
basically copy a sentence or two into the message (memo) field.

What I am hoping for is that I send a form to an employee... if they
agree
with the content, they can click a button which would then paste a
standard
statement "I agree to the above terms and conditions" to the mail
message.

Thank you in advance,
Angie







  #5  
Old September 18th 09, 06:33 PM posted to microsoft.public.outlook.program_forms
Delnang
external usenet poster
 
Posts: 23
Default Code Button to Copy Standard Text in Memo (message) Field

The email editor choice is set by the user. The text copied in can be flat
rtf text...no bells and whistles.
Thank you,
Angie

"Sue Mosher [MVP]" wrote:

Is Word the email editor? Or the native Outlook editor? Do you care if the
formatting is flattened if the message format is RTF?
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Delnang" wrote in message
...
Sue,
Thank you for your response. Yes, I am able to publish these forms to the
Organizational Forms library on our company's Exchange server. We are
using
Outlook 2003. The message format type would be determined by the users
default which means it could be any of these three.

Thanks,
Angie

"Sue Mosher [MVP]" wrote:

Are you able to publish forms to the Organizational Forms library on your
company's Exchange server? If not, then this project is not feasible. If
so,
then please provide information about the Outlook version and whether
these
would be plain text, HTML, or RTF format messages?

"Delnang" wrote in message
...
I am looking for the code I could use behind a macro button that would
basically copy a sentence or two into the message (memo) field.

What I am hoping for is that I send a form to an employee... if they
agree
with the content, they can click a button which would then paste a
standard
statement "I agree to the above terms and conditions" to the mail
message.

Thank you in advance,
Angie








  #6  
Old September 18th 09, 06:48 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default Code Button to Copy Standard Text in Memo (message) Field

With all those details, we can now talk about a solution. If you want to
append text to the end, just concatenate the new text with the existing Body
property:

Item.Body = Item.Body & vbCrLf & "new stuff"

If you want the text inserted somewhere in the middle, I would put a
placeholder token there, something like %sig% or another string that won't
be mistaken for text. You can then use the Replace() function to replace
that text in the Body or HTMLBody property, as appropriate.

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


"Delnang" wrote in message
...
The email editor choice is set by the user. The text copied in can be
flat
rtf text...no bells and whistles.


Thank you for your response. Yes, I am able to publish these forms to
the
Organizational Forms library on our company's Exchange server. We are
using
Outlook 2003. The message format type would be determined by the users
default which means it could be any of these three.

I am looking for the code I could use behind a macro button that
would
basically copy a sentence or two into the message (memo) field.

What I am hoping for is that I send a form to an employee... if they
agree
with the content, they can click a button which would then paste a
standard
statement "I agree to the above terms and conditions" to the mail
message.



  #7  
Old September 18th 09, 10:22 PM posted to microsoft.public.outlook.program_forms
Delnang
external usenet poster
 
Posts: 23
Default Code Button to Copy Standard Text in Memo (message) Field

I need just a little more help with the code. Will this be written like:

Function (Acknowledgement)
Item.Body = Item.Body & vbCrLf & "new stuff"
End Function

I do not know all the code to make it work. I added this code to a button
and it gives an error in line 1.

Thanks for hanging in with me.

Angie
"Delnang" wrote:

The email editor choice is set by the user. The text copied in can be flat
rtf text...no bells and whistles.
Thank you,
Angie

"Sue Mosher [MVP]" wrote:

Is Word the email editor? Or the native Outlook editor? Do you care if the
formatting is flattened if the message format is RTF?
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Delnang" wrote in message
...
Sue,
Thank you for your response. Yes, I am able to publish these forms to the
Organizational Forms library on our company's Exchange server. We are
using
Outlook 2003. The message format type would be determined by the users
default which means it could be any of these three.

Thanks,
Angie

"Sue Mosher [MVP]" wrote:

Are you able to publish forms to the Organizational Forms library on your
company's Exchange server? If not, then this project is not feasible. If
so,
then please provide information about the Outlook version and whether
these
would be plain text, HTML, or RTF format messages?

"Delnang" wrote in message
...
I am looking for the code I could use behind a macro button that would
basically copy a sentence or two into the message (memo) field.

What I am hoping for is that I send a form to an employee... if they
agree
with the content, they can click a button which would then paste a
standard
statement "I agree to the above terms and conditions" to the mail
message.

Thank you in advance,
Angie








  #8  
Old September 18th 09, 10:49 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP][_3_]
external usenet poster
 
Posts: 465
Default Code Button to Copy Standard Text in Memo (message) Field

Parentheses are used to enclose arguments. Therefore, your function has no
name. And in fact, you don't want a function at all, because you're not
returning a value. See http://www.outlookcode.com/article.aspx?ID=38 for an
example of the Click event handler for a button on a form, which is what
you're creating, right?

Note that this is not a VBA macro, but VBScript code behind the form.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Delnang" wrote in message
...
I need just a little more help with the code. Will this be written like:

Function (Acknowledgement)
Item.Body = Item.Body & vbCrLf & "new stuff"
End Function

I do not know all the code to make it work. I added this code to a
button
and it gives an error in line 1.


The email editor choice is set by the user. The text copied in can be
flat
rtf text...no bells and whistles.
Thank you,
Angie

"Sue Mosher [MVP]" wrote:

Is Word the email editor? Or the native Outlook editor? Do you care if
the
formatting is flattened if the message format is RTF?

"Delnang" wrote in message
...
Sue,
Thank you for your response. Yes, I am able to publish these forms
to the
Organizational Forms library on our company's Exchange server. We
are
using
Outlook 2003. The message format type would be determined by the
users
default which means it could be any of these three.

Thanks,
Angie

"Sue Mosher [MVP]" wrote:

Are you able to publish forms to the Organizational Forms library on
your
company's Exchange server? If not, then this project is not
feasible. If
so,
then please provide information about the Outlook version and
whether
these
would be plain text, HTML, or RTF format messages?

"Delnang" wrote in message
...
I am looking for the code I could use behind a macro button that
would
basically copy a sentence or two into the message (memo) field.

What I am hoping for is that I send a form to an employee... if
they
agree
with the content, they can click a button which would then paste a
standard
statement "I agree to the above terms and conditions" to the mail
message.



  #9  
Old September 21st 09, 03:22 PM posted to microsoft.public.outlook.program_forms
Delnang
external usenet poster
 
Posts: 23
Default Code Button to Copy Standard Text in Memo (message) Field

Great, thank you for all your help.

Angie

"Sue Mosher [MVP]" wrote:

Parentheses are used to enclose arguments. Therefore, your function has no
name. And in fact, you don't want a function at all, because you're not
returning a value. See http://www.outlookcode.com/article.aspx?ID=38 for an
example of the Click event handler for a button on a form, which is what
you're creating, right?

Note that this is not a VBA macro, but VBScript code behind the form.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Delnang" wrote in message
...
I need just a little more help with the code. Will this be written like:

Function (Acknowledgement)
Item.Body = Item.Body & vbCrLf & "new stuff"
End Function

I do not know all the code to make it work. I added this code to a
button
and it gives an error in line 1.


The email editor choice is set by the user. The text copied in can be
flat
rtf text...no bells and whistles.
Thank you,
Angie

"Sue Mosher [MVP]" wrote:

Is Word the email editor? Or the native Outlook editor? Do you care if
the
formatting is flattened if the message format is RTF?

"Delnang" wrote in message
...
Sue,
Thank you for your response. Yes, I am able to publish these forms
to the
Organizational Forms library on our company's Exchange server. We
are
using
Outlook 2003. The message format type would be determined by the
users
default which means it could be any of these three.

Thanks,
Angie

"Sue Mosher [MVP]" wrote:

Are you able to publish forms to the Organizational Forms library on
your
company's Exchange server? If not, then this project is not
feasible. If
so,
then please provide information about the Outlook version and
whether
these
would be plain text, HTML, or RTF format messages?

"Delnang" wrote in message
...
I am looking for the code I could use behind a macro button that
would
basically copy a sentence or two into the message (memo) field.

What I am hoping for is that I send a form to an employee... if
they
agree
with the content, they can click a button which would then paste a
standard
statement "I agree to the above terms and conditions" to the mail
message.




  #10  
Old December 17th 09, 02:43 PM posted to microsoft.public.outlook.program_forms
Delnang
external usenet poster
 
Posts: 23
Default Code Button to Copy Standard Text in Memo (message) Field

The code buttons are working fine where the buttons enter text in the memo
field. However...When the user Forwards a message which has an attachment
and the next user receives it and clicks Forward...the attachment field does
not display. The attachment is still there, but it doesn't display. Is
there a way to display the attachment field?
Angie

"Delnang" wrote:

I am looking for the code I could use behind a macro button that would
basically copy a sentence or two into the message (memo) field.

What I am hoping for is that I send a form to an employee... if they agree
with the content, they can click a button which would then paste a standard
statement "I agree to the above terms and conditions" to the mail message.

Thank you in advance,
Angie


 




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
Insert standard text into a new message Gabe Outlook and VBA 9 January 24th 08 10:05 PM
Standard Text in a new E-Mail Message Bob Miller Outlook and VBA 1 November 7th 07 05:40 AM
Insert 'Standard Text' to a reply message OU_MartynF Outlook and VBA 5 August 1st 07 02:15 PM
Populating a standard message in the message field stone Outlook - Using Forms 1 July 11th 07 12:08 AM
Run VBA Code from 'new mail message' on standard toolbar Carmi Outlook and VBA 8 March 31st 06 05:53 PM


All times are GMT +1. The time now is 05:24 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.