Welcome to SPN

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

Sign Up Now!

Inserting a carriage return

Discussion in 'Information Technology' started by Jeff C, Jul 28, 2006.

  1. Jeff C

    Jeff C
    Expand Collapse
    Guest

    Using SendObject I have in the correct syntax:

    ,"this is my text in the message body",True

    I want to insert a carriage return and have tried:

    ,"this is my text"& vbCrLf &"the message body", True

    Which does not work. Can anyone correct me OR is it not possible to do this
    in this case?

    Thank you
     
  2. Loading...

    Similar Threads Forum Date
    Link Between Antidepressants and Miscarriage Parenting Jun 1, 2010
    Sikh News Lahore - Nankana Sahib Dual Carriageway in pipeline Breaking News Jan 4, 2005

  3. SusanV

    SusanV
    Expand Collapse
    Guest

    It certainly ought to work and looks ok - for debugging put it in a variable
    and use debug.print:

    dim b as string

    b = "first Line"
    b = b & vbCrLf & "SecondLine"
    debug.print b

    You should see in the immediate window:

    Fist Line
    Second Line

    Once you get the variable to look as you wish for the message body, use the
    variable in your docmd line.
    --
    hth,
    SusanV



    "Jeff C" <JeffC@discussions.microsoft.com> wrote in message
    news:74048350-88DA-4551-ABAA-7851D8FBC097@microsoft.com...
    > Using SendObject I have in the correct syntax:
    >
    > ,"this is my text in the message body",True
    >
    > I want to insert a carriage return and have tried:
    >
    > ,"this is my text"& vbCrLf &"the message body", True
    >
    > Which does not work. Can anyone correct me OR is it not possible to do
    > this
    > in this case?
    >
    > Thank you
     
  4. Jeff C

    Jeff C
    Expand Collapse
    Guest

    Thank you Susan, putting the string together and declaring as a variable
    worked. I don't understand why it did not work as a straight string but
    be-it-as-it-may, the problem is resolved and I have the solution for the next
    time I need it. I appreciate your help so quickly.

    "SusanV" wrote:

    > It certainly ought to work and looks ok - for debugging put it in a variable
    > and use debug.print:
    >
    > dim b as string
    >
    > b = "first Line"
    > b = b & vbCrLf & "SecondLine"
    > debug.print b
    >
    > You should see in the immediate window:
    >
    > Fist Line
    > Second Line
    >
    > Once you get the variable to look as you wish for the message body, use the
    > variable in your docmd line.
    > --
    > hth,
    > SusanV
    >
    >
    >
    > "Jeff C" <JeffC@discussions.microsoft.com> wrote in message
    > news:74048350-88DA-4551-ABAA-7851D8FBC097@microsoft.com...
    > > Using SendObject I have in the correct syntax:
    > >
    > > ,"this is my text in the message body",True
    > >
    > > I want to insert a carriage return and have tried:
    > >
    > > ,"this is my text"& vbCrLf &"the message body", True
    > >
    > > Which does not work. Can anyone correct me OR is it not possible to do
    > > this
    > > in this case?
    > >
    > > Thank you

    >
    >
    >
     
  5. Jeff C

    Jeff C
    Expand Collapse
    Guest

    The solution was putting it a variable I guess, just as you suggested. I
    appreciate your help. Don't know why the straight string didn't work but,
    thank you.

    "SusanV" wrote:

    > It certainly ought to work and looks ok - for debugging put it in a variable
    > and use debug.print:
    >
    > dim b as string
    >
    > b = "first Line"
    > b = b & vbCrLf & "SecondLine"
    > debug.print b
    >
    > You should see in the immediate window:
    >
    > Fist Line
    > Second Line
    >
    > Once you get the variable to look as you wish for the message body, use the
    > variable in your docmd line.
    > --
    > hth,
    > SusanV
    >
    >
    >
    > "Jeff C" <JeffC@discussions.microsoft.com> wrote in message
    > news:74048350-88DA-4551-ABAA-7851D8FBC097@microsoft.com...
    > > Using SendObject I have in the correct syntax:
    > >
    > > ,"this is my text in the message body",True
    > >
    > > I want to insert a carriage return and have tried:
    > >
    > > ,"this is my text"& vbCrLf &"the message body", True
    > >
    > > Which does not work. Can anyone correct me OR is it not possible to do
    > > this
    > > in this case?
    > >
    > > Thank you

    >
    >
    >
     
  6. SusanV

    SusanV
    Expand Collapse
    Guest

    Glad to help any time!

    ;-)

    SusanV

    "Jeff C" <JeffC@discussions.microsoft.com> wrote in message
    news:C1C96258-CF45-42B8-826A-5B831EF14243@microsoft.com...
    > Thank you Susan, putting the string together and declaring as a variable
    > worked. I don't understand why it did not work as a straight string but
    > be-it-as-it-may, the problem is resolved and I have the solution for the
    > next
    > time I need it. I appreciate your help so quickly.
    >
    > "SusanV" wrote:
    >
    >> It certainly ought to work and looks ok - for debugging put it in a
    >> variable
    >> and use debug.print:
    >>
    >> dim b as string
    >>
    >> b = "first Line"
    >> b = b & vbCrLf & "SecondLine"
    >> debug.print b
    >>
    >> You should see in the immediate window:
    >>
    >> Fist Line
    >> Second Line
    >>
    >> Once you get the variable to look as you wish for the message body, use
    >> the
    >> variable in your docmd line.
    >> --
    >> hth,
    >> SusanV
    >>
    >>
    >>
    >> "Jeff C" <JeffC@discussions.microsoft.com> wrote in message
    >> news:74048350-88DA-4551-ABAA-7851D8FBC097@microsoft.com...
    >> > Using SendObject I have in the correct syntax:
    >> >
    >> > ,"this is my text in the message body",True
    >> >
    >> > I want to insert a carriage return and have tried:
    >> >
    >> > ,"this is my text"& vbCrLf &"the message body", True
    >> >
    >> > Which does not work. Can anyone correct me OR is it not possible to do
    >> > this
    >> > in this case?
    >> >
    >> > Thank you

    >>
    >>
    >>
     

Share This Page