Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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

    >>
    >>
    >>
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page