Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

How do I post message in a body or addresses to the To: box

Discussion in 'Information Technology' started by Rich Selby, Jul 28, 2006.

  1. Rich Selby

    Rich Selby
    Expand Collapse
    Guest

    I know how to send an e-mail using the SendObject function but it limits me
    to 255 characters which is way less than I need. Any ideas?
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News The Wisconsin Sikh Temple Attack And Why Post-Tragedy Rhetoric Matters - Huffington Post Breaking News Aug 7, 2016
    Sikh News Anmolpreet Kandola: What It Was Like Growing Up As A Sikh In New York, Post-9/11 Breaking News Apr 12, 2016
    Sikh News Why This Sikh Cartoonist Is Sending A Postcard To Trump Every Day Breaking News Mar 23, 2016
    Sikhism And Apostasy Sikh Sikhi Sikhism Feb 12, 2016
    Help Clean Up SPN Posts Sikh Sikhi Sikhism Dec 23, 2015

  3. Dirk Goldgar

    Dirk Goldgar
    Expand Collapse
    Guest

    "Rich Selby" <RichSelby@discussions.microsoft.com> wrote in message
    news:A7145CC8-5F73-466F-B230-81D9657AD828@microsoft.com
    > I know how to send an e-mail using the SendObject function but it
    > limits me to 255 characters which is way less than I need. Any ideas?


    The message body is *not* limited to 255 characters. How are you trying
    to do this, that makes you think it is? If you're storing the message
    text in a table, in a Text field, that field size is limited to 255
    characters. You'd need to use a Memo field instead.

    --
    Dirk Goldgar, MS Access MVP
    www.datagnostics.com

    (please reply to the newsgroup)
     
  4. Rich Selby

    Rich Selby
    Expand Collapse
    Guest

    I am storing my text in a memo field called "Letter". I have a form that that
    displays this field "Letter". So in my macro -> SendObject -> "Message:"
    line, to send the "Letter" in the body of Outlook, I type:
    [Forms]![Formname]![Letter]. Outlook opens up and chops off the text after
    255 characters. Am I doing something wrong? Thanks,

    "Dirk Goldgar" wrote:

    > "Rich Selby" <RichSelby@discussions.microsoft.com> wrote in message
    > news:A7145CC8-5F73-466F-B230-81D9657AD828@microsoft.com
    > > I know how to send an e-mail using the SendObject function but it
    > > limits me to 255 characters which is way less than I need. Any ideas?

    >
    > The message body is *not* limited to 255 characters. How are you trying
    > to do this, that makes you think it is? If you're storing the message
    > text in a table, in a Text field, that field size is limited to 255
    > characters. You'd need to use a Memo field instead.
    >
    > --
    > Dirk Goldgar, MS Access MVP
    > www.datagnostics.com
    >
    > (please reply to the newsgroup)
    >
    >
    >
     
  5. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    Do you have a format or input mask defined for the text box? If so, that's
    probably the problem.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Rich Selby" <RichSelby@discussions.microsoft.com> wrote in message
    news:82B6D88A-E2A1-44C0-9B54-1712A1B73A11@microsoft.com...
    > I am storing my text in a memo field called "Letter". I have a form that

    that
    > displays this field "Letter". So in my macro -> SendObject -> "Message:"
    > line, to send the "Letter" in the body of Outlook, I type:
    > [Forms]![Formname]![Letter]. Outlook opens up and chops off the text after
    > 255 characters. Am I doing something wrong? Thanks,
    >
    > "Dirk Goldgar" wrote:
    >
    > > "Rich Selby" <RichSelby@discussions.microsoft.com> wrote in message
    > > news:A7145CC8-5F73-466F-B230-81D9657AD828@microsoft.com
    > > > I know how to send an e-mail using the SendObject function but it
    > > > limits me to 255 characters which is way less than I need. Any ideas?

    > >
    > > The message body is *not* limited to 255 characters. How are you trying
    > > to do this, that makes you think it is? If you're storing the message
    > > text in a table, in a Text field, that field size is limited to 255
    > > characters. You'd need to use a Memo field instead.
    > >
    > > --
    > > Dirk Goldgar, MS Access MVP
    > > www.datagnostics.com
    > >
    > > (please reply to the newsgroup)
    > >
    > >
    > >
     
  6. Dirk Goldgar

    Dirk Goldgar
    Expand Collapse
    Guest

    "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    news:%23uT25OZiGHA.4144@TK2MSFTNGP02.phx.gbl
    > Do you have a format or input mask defined for the text box? If so,
    > that's probably the problem.
    >
    >
    > "Rich Selby" <RichSelby@discussions.microsoft.com> wrote in message
    > news:82B6D88A-E2A1-44C0-9B54-1712A1B73A11@microsoft.com...
    >> I am storing my text in a memo field called "Letter". I have a form
    >> that that displays this field "Letter". So in my macro -> SendObject
    >> -> "Message:" line, to send the "Letter" in the body of Outlook, I
    >> type: [Forms]![Formname]![Letter]. Outlook opens up and chops off
    >> the text after 255 characters. Am I doing something wrong? Thanks,


    I think it may be a limitation of the SendObject macro action. Since
    Rich didn't mention macros, I tested the DoCmd.SendObject method in VBA
    code. I think the macro action has 255-byte limit, where VBA method
    does not. Rich, you might consider rewriting your macro as a VBA event
    procedure instead, and see if it works better.

    --
    Dirk Goldgar, MS Access MVP
    www.datagnostics.com

    (please reply to the newsgroup)
     
  7. Rich Selby

    Rich Selby
    Expand Collapse
    Guest

    No formats or input mask. Are you saying you can send a long letter in the
    body of an Outlook e-mail launched from MS Access and not as an attachment?
    I've been trying this for months and cant get it to work. How would you go
    about inserting text in a memo field into the body of an Outlook e-mail via
    macro?

    "Douglas J Steele" wrote:

    > Do you have a format or input mask defined for the text box? If so, that's
    > probably the problem.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "Rich Selby" <RichSelby@discussions.microsoft.com> wrote in message
    > news:82B6D88A-E2A1-44C0-9B54-1712A1B73A11@microsoft.com...
    > > I am storing my text in a memo field called "Letter". I have a form that

    > that
    > > displays this field "Letter". So in my macro -> SendObject -> "Message:"
    > > line, to send the "Letter" in the body of Outlook, I type:
    > > [Forms]![Formname]![Letter]. Outlook opens up and chops off the text after
    > > 255 characters. Am I doing something wrong? Thanks,
    > >
    > > "Dirk Goldgar" wrote:
    > >
    > > > "Rich Selby" <RichSelby@discussions.microsoft.com> wrote in message
    > > > news:A7145CC8-5F73-466F-B230-81D9657AD828@microsoft.com
    > > > > I know how to send an e-mail using the SendObject function but it
    > > > > limits me to 255 characters which is way less than I need. Any ideas?
    > > >
    > > > The message body is *not* limited to 255 characters. How are you trying
    > > > to do this, that makes you think it is? If you're storing the message
    > > > text in a table, in a Text field, that field size is limited to 255
    > > > characters. You'd need to use a Memo field instead.
    > > >
    > > > --
    > > > Dirk Goldgar, MS Access MVP
    > > > www.datagnostics.com
    > > >
    > > > (please reply to the newsgroup)
    > > >
    > > >
    > > >

    >
    >
    >
     
  8. Rich Selby

    Rich Selby
    Expand Collapse
    Guest

    Ooooh gotcha. That might just be it! I'll go try find the code somewhere to
    to that. Do you have any good spots to find that kind of code. Thanks a lot
    for all your help!!

    "Dirk Goldgar" wrote:

    > "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
    > news:%23uT25OZiGHA.4144@TK2MSFTNGP02.phx.gbl
    > > Do you have a format or input mask defined for the text box? If so,
    > > that's probably the problem.
    > >
    > >
    > > "Rich Selby" <RichSelby@discussions.microsoft.com> wrote in message
    > > news:82B6D88A-E2A1-44C0-9B54-1712A1B73A11@microsoft.com...
    > >> I am storing my text in a memo field called "Letter". I have a form
    > >> that that displays this field "Letter". So in my macro -> SendObject
    > >> -> "Message:" line, to send the "Letter" in the body of Outlook, I
    > >> type: [Forms]![Formname]![Letter]. Outlook opens up and chops off
    > >> the text after 255 characters. Am I doing something wrong? Thanks,

    >
    > I think it may be a limitation of the SendObject macro action. Since
    > Rich didn't mention macros, I tested the DoCmd.SendObject method in VBA
    > code. I think the macro action has 255-byte limit, where VBA method
    > does not. Rich, you might consider rewriting your macro as a VBA event
    > procedure instead, and see if it works better.
    >
    > --
    > Dirk Goldgar, MS Access MVP
    > www.datagnostics.com
    >
    > (please reply to the newsgroup)
    >
    >
    >
     
  9. Dirk Goldgar

    Dirk Goldgar
    Expand Collapse
    Guest

    "Rich Selby" <RichSelby@discussions.microsoft.com> wrote in message
    news:1F0F8D79-AFD4-491F-B4AB-74AFFECDC337@microsoft.com
    > Ooooh gotcha. That might just be it! I'll go try find the code
    > somewhere to to that. Do you have any good spots to find that kind of
    > code. Thanks a lot for all your help!!


    Suppose you were sending this message from the Click event of a command
    button named (for example) "cmdSend", on a form that also contains text
    boxes named "Recipient", "Subject", and "Letter". The code for that
    button's event procedure might look like this:

    '----- start of example code -----
    Private Sub cmdSend_Click()

    DoCmd.SendObject _
    To:=Me!Recipient, _
    Subject:=Me!Subject, _
    MessageText:=Me!Letter, _
    EditMessage:=False

    ' Note: if you want to edit the message before sending,
    ' change "False" to "True" in the above.

    End Sub
    '----- end of example code -----

    There's not much to it, really. You may want to add code to make sure
    none of the text boxes is empty before sending the message.

    --
    Dirk Goldgar, MS Access MVP
    www.datagnostics.com

    (please reply to the newsgroup)
     
  10. Rich Selby

    Rich Selby
    Expand Collapse
    Guest

    Dirk, it worked! One more question, how would I add a field thats on another
    form. Would I replace "Me!Letter" with "[Forms]![OtherForm]![Message]"?
    Thanks again!

    "Dirk Goldgar" wrote:

    > "Rich Selby" <RichSelby@discussions.microsoft.com> wrote in message
    > news:1F0F8D79-AFD4-491F-B4AB-74AFFECDC337@microsoft.com
    > > Ooooh gotcha. That might just be it! I'll go try find the code
    > > somewhere to to that. Do you have any good spots to find that kind of
    > > code. Thanks a lot for all your help!!

    >
    > Suppose you were sending this message from the Click event of a command
    > button named (for example) "cmdSend", on a form that also contains text
    > boxes named "Recipient", "Subject", and "Letter". The code for that
    > button's event procedure might look like this:
    >
    > '----- start of example code -----
    > Private Sub cmdSend_Click()
    >
    > DoCmd.SendObject _
    > To:=Me!Recipient, _
    > Subject:=Me!Subject, _
    > MessageText:=Me!Letter, _
    > EditMessage:=False
    >
    > ' Note: if you want to edit the message before sending,
    > ' change "False" to "True" in the above.
    >
    > End Sub
    > '----- end of example code -----
    >
    > There's not much to it, really. You may want to add code to make sure
    > none of the text boxes is empty before sending the message.
    >
    > --
    > Dirk Goldgar, MS Access MVP
    > www.datagnostics.com
    >
    > (please reply to the newsgroup)
    >
    >
    >
     
  11. Dirk Goldgar

    Dirk Goldgar
    Expand Collapse
    Guest

    "Rich Selby" <RichSelby@discussions.microsoft.com> wrote in message
    news:12780B2E-7B59-4817-84A9-91B338FB502F@microsoft.com
    > Dirk, it worked! One more question, how would I add a field thats on
    > another form. Would I replace "Me!Letter" with
    > "[Forms]![OtherForm]![Message]"?


    Exactly. Of course, that form must be open when you run the code.

    > Thanks again!


    You're welcome.

    --
    Dirk Goldgar, MS Access MVP
    www.datagnostics.com

    (please reply to the newsgroup)
     

Share This Page