PC Review


Reply
Thread Tools Rate Thread

Access 2007 Macros - SendObject action, Message Text action argume

 
 
rgille
Guest
Posts: n/a
 
      25th Aug 2009
I am trying to learn about Access 2007 macros. I downloaded the Call Tracker
template from Microsoft.com. The Call Details form in this template has an
E-mail button which, when clicked, dumps the contents of the form’s
Description field into the body of the e-mail. The E-mail button runs an
embedded macro On Click. Looking at the properties of the embedded macro’s
SendObject action, the Message Text action argument looks like this:
=IIf([Form].[Description].[TextFormat]=1,PlainText([Description]),[Description])
I want to include the form’s Comments field in the Message Text too, so
that the email message will include the Comments field contents followed by
the Description field contents (if possible I would like these on separate
lines). Can anyone point me in the right direction to do this? Thank you.
 
Reply With Quote
 
 
 
 
Steve Schapel
Guest
Posts: n/a
 
      25th Aug 2009
Rgille,

Without looking at the actual template you are using for your example, I
guess it is likely to be like this...

=IIf([Form].[Description].[TextFormat]=1,PlainText([Comments] & Chr(13) &
Chr(10) & [Description]),[Comments] & Chr(13) & Chr(10) & [Description])

--
Steve Schapel, Microsoft Access MVP


"rgille" <(E-Mail Removed)> wrote in message
news:25483594-49F8-4A96-8A27-(E-Mail Removed)...
> I am trying to learn about Access 2007 macros. I downloaded the Call
> Tracker
> template from Microsoft.com. The Call Details form in this template has
> an
> E-mail button which, when clicked, dumps the contents of the form’s
> Description field into the body of the e-mail. The E-mail button runs an
> embedded macro On Click. Looking at the properties of the embedded macro’s
> SendObject action, the Message Text action argument looks like this:
> =IIf([Form].[Description].[TextFormat]=1,PlainText([Description]),[Description])
> I want to include the form’s Comments field in the Message Text too, so
> that the email message will include the Comments field contents followed
> by
> the Description field contents (if possible I would like these on separate
> lines). Can anyone point me in the right direction to do this? Thank
> you.


 
Reply With Quote
 
rgille
Guest
Posts: n/a
 
      25th Aug 2009
Steve - Thank you, that worked! One question: Is there way to automatically
insert a "carriage return" (blank line) between the Comments text and the
Description text in the generated e-mail? Thanks again. - Bob

"Steve Schapel" wrote:

> Rgille,
>
> Without looking at the actual template you are using for your example, I
> guess it is likely to be like this...
>
> =IIf([Form].[Description].[TextFormat]=1,PlainText([Comments] & Chr(13) &
> Chr(10) & [Description]),[Comments] & Chr(13) & Chr(10) & [Description])
>
> --
> Steve Schapel, Microsoft Access MVP
>
>
> "rgille" <(E-Mail Removed)> wrote in message
> news:25483594-49F8-4A96-8A27-(E-Mail Removed)...
> > I am trying to learn about Access 2007 macros. I downloaded the Call
> > Tracker
> > template from Microsoft.com. The Call Details form in this template has
> > an
> > E-mail button which, when clicked, dumps the contents of the form’s
> > Description field into the body of the e-mail. The E-mail button runs an
> > embedded macro On Click. Looking at the properties of the embedded macro’s
> > SendObject action, the Message Text action argument looks like this:
> > =IIf([Form].[Description].[TextFormat]=1,PlainText([Description]),[Description])
> > I want to include the form’s Comments field in the Message Text too, so
> > that the email message will include the Comments field contents followed
> > by
> > the Description field contents (if possible I would like these on separate
> > lines). Can anyone point me in the right direction to do this? Thank
> > you.

>
>

 
Reply With Quote
 
Steve Schapel
Guest
Posts: n/a
 
      25th Aug 2009
Rgille,

Chr(13) & Chr(10) takes you to a new line. To insert a blank line, just
repeat...

[Comments] & Chr(13) & Chr(10) & Chr(13) & Chr(10) & [Description]

--
Steve Schapel, Microsoft Access MVP


"rgille" <(E-Mail Removed)> wrote in message
news:644C5F43-AB76-4E77-B503-(E-Mail Removed)...
> Steve - Thank you, that worked! One question: Is there way to
> automatically
> insert a "carriage return" (blank line) between the Comments text and the
> Description text in the generated e-mail? Thanks again. - Bob
>



 
Reply With Quote
 
rgille
Guest
Posts: n/a
 
      26th Aug 2009
Many thanks Steve. - Bob

"Steve Schapel" wrote:

> Rgille,
>
> Chr(13) & Chr(10) takes you to a new line. To insert a blank line, just
> repeat...
>
> [Comments] & Chr(13) & Chr(10) & Chr(13) & Chr(10) & [Description]
>
> --
> Steve Schapel, Microsoft Access MVP
>
>
> "rgille" <(E-Mail Removed)> wrote in message
> news:644C5F43-AB76-4E77-B503-(E-Mail Removed)...
> > Steve - Thank you, that worked! One question: Is there way to
> > automatically
> > insert a "carriage return" (blank line) between the Comments text and the
> > Description text in the generated e-mail? Thanks again. - Bob
> >

>
>
>

 
Reply With Quote
 
matt
Guest
Posts: n/a
 
      8th Dec 2009
If you wanted to lable these feilds in the email how would you do so?

"Steve Schapel" wrote:

> Rgille,
>
> Chr(13) & Chr(10) takes you to a new line. To insert a blank line, just
> repeat...
>
> [Comments] & Chr(13) & Chr(10) & Chr(13) & Chr(10) & [Description]
>
> --
> Steve Schapel, Microsoft Access MVP
>
>
> "rgille" <(E-Mail Removed)> wrote in message
> news:644C5F43-AB76-4E77-B503-(E-Mail Removed)...
> > Steve - Thank you, that worked! One question: Is there way to
> > automatically
> > insert a "carriage return" (blank line) between the Comments text and the
> > Description text in the generated e-mail? Thanks again. - Bob
> >

>
>
>

 
Reply With Quote
 
Steve Schapel
Guest
Posts: n/a
 
      9th Dec 2009
I am not sure what you mean, Matt. Can you give an example of what you
want?

--
Steve Schapel, Microsoft Access MVP


"matt" <(E-Mail Removed)> wrote in message
news:A3DC45F8-3A2C-48F4-8339-(E-Mail Removed)...
> If you wanted to lable these feilds in the email how would you do so?
>



 
Reply With Quote
 
RamanVE
Guest
Posts: n/a
 
      26th Feb 2010
Hi Steve,
I found this thread very useful. Firstly, thanks for your help.

Now, just in addition to this: I would like to add free text.

I want to add comments and due date, but i would like to add free text in
the email which says "Comments" and "Due date" as headings.

Could you please help me with this?

Thanks

"Steve Schapel" wrote:

> I am not sure what you mean, Matt. Can you give an example of what you
> want?
>
> --
> Steve Schapel, Microsoft Access MVP
>
>
> "matt" <(E-Mail Removed)> wrote in message
> news:A3DC45F8-3A2C-48F4-8339-(E-Mail Removed)...
> > If you wanted to lable these feilds in the email how would you do so?
> >

>
>
> .
>

 
Reply With Quote
 
New Member
Join Date: Feb 2012
Posts: 1
 
      28th Feb 2012
I too found this very helpful and I as well, need a little bit of guidance. In the expression: > =IIf([Form].[Description].[TextFormat]=1,PlainText([Comments] & Chr(13) &
Chr(10) & [Description]),[Comments] & Chr(13) & Chr(10) & [Description]),


I would like to add data from a table before the comments and description are inserted. The table name is "Atext" . The column name is "Phrase". the ID is 1

can you point me in the correct direction?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SendObject Action Message Jani Microsoft Access Form Coding 1 25th Aug 2009 02:47 PM
Access 2007 - New - Macros - Transfer Spreadsheet Action Paperback Writer Microsoft Access 3 23rd Dec 2008 07:47 PM
SetWarnings Action in Access 2007 Macros =?Utf-8?B?c2ticm93bg==?= Microsoft Access 3 10th Nov 2006 05:21 PM
How to access a macros action & comments fields using VB .net Paul M Microsoft Access 0 11th Feb 2006 08:15 PM
How to access a macros action & comments fields using VB .net Paul M Microsoft Dot NET 0 11th Feb 2006 08:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:53 PM.