Windows Vista Forums

New line in stead of new paragraph

  1. #1


    Wendy Guest

    New line in stead of new paragraph

    I use VBscript to make a Signature in Outlook with the values of the Active
    directory.

    In outlook 2003 the sentences are on the next line. In Outlook 2007 all new
    sentences are treated like new paragraphs. The normal.dotm is all ready
    changed to get to the next line if pressed enter.

    How can I change this behavior?


      My System SpecsSystem Spec

  2.   


  3. #2


    Pegasus \(MVP\) Guest

    Re: New line in stead of new paragraph


    "Wendy" <Wendy@xxxxxx> wrote in message
    news:E688A314-8927-4CD8-B742-882DFF304DE1@xxxxxx

    >I use VBscript to make a Signature in Outlook with the values of the Active
    > directory.
    >
    > In outlook 2003 the sentences are on the next line. In Outlook 2007 all
    > new
    > sentences are treated like new paragraphs. The normal.dotm is all ready
    > changed to get to the next line if pressed enter.
    >
    > How can I change this behavior?
    >
    Let's have a look at your script.



      My System SpecsSystem Spec

  4. #3


    Wendy Guest

    Re: New line in stead of new paragraph

    > Let's have a look at your script.

    >
    This is the script

    Between the Title and the Company name i use the "& vbCrLf" option for the
    next line. But it stil behaves as a paragraph.

    =====
    On Error Resume Next

    Set objSysInfo = CreateObject("ADSystemInfo")

    strUser = objSysInfo.UserName
    Set objUser = GetObject("LDAP://" & strUser)

    strName = objUser.FullName
    strTitle = objUser.Title
    strCompany = objUser.Company
    strPhone = objUser.telephoneNumber
    strl = objUser.l
    strst = objUser.st
    strmail = objUser.mail
    strwWWHomePage = objUser.wWWHomePage


    Set objWord = CreateObject("Word.Application")

    Set objDoc = objWord.Documents.Add()
    Set objSelection = objWord.Selection

    Set objEmailOptions = objWord.EmailOptions
    Set objSignatureObject = objEmailOptions.EmailSignature

    Set objSignatureEntries = objSignatureObject.EmailSignatureEntries

    objSelection.Font.Name = "Verdana"
    objSelection.Font.Size = "10"

    objSelection.TypeText "Kind Regards,"
    objSelection.TypeParagraph()

    objSelection.TypeText strName
    objSelection.TypeParagraph()

    objSelection.Font.Size = "10"

    objSelection.TypeText strTitle & vbCrLf
    objSelection.TypeText strCompany
    objSelection.TypeParagraph()

    objSelection.Font.Size = "7,5"

    objSelection.TypeText "Tel.: "
    objSelection.TypeText strPhone & vbCrLf
    objSelection.TypeText strmail & vbCrLf
    objSelection.TypeText strwWWHomePage
    objSelection.TypeParagraph()

    objSelection.TypeText "disclaimer: "

    Set objSelection = objDoc.Range()

    objSignatureEntries.Add "AD Signature", objSelection
    objSignatureObject.NewMessageSignature = "AD Signature"
    objSignatureObject.ReplyMessageSignature = "AD Signature"

    objDoc.Saved = True
    objWord.Quit



      My System SpecsSystem Spec

  5. #4


    Pegasus \(MVP\) Guest

    Re: New line in stead of new paragraph


    "Wendy" <Wendy@xxxxxx> wrote in message
    news:9A13BE5D-0BBA-4CA5-B813-6D130CD467DE@xxxxxx

    >> Let's have a look at your script.
    >>
    > This is the script
    >
    > Between the Title and the Company name i use the "& vbCrLf" option for
    > the
    > next line. But it stil behaves as a paragraph.
    >
    > =====
    > On Error Resume Next
    >
    > Set objSysInfo = CreateObject("ADSystemInfo")
    >
    > strUser = objSysInfo.UserName
    > Set objUser = GetObject("LDAP://" & strUser)
    >
    > strName = objUser.FullName
    > strTitle = objUser.Title
    > strCompany = objUser.Company
    > strPhone = objUser.telephoneNumber
    > strl = objUser.l
    > strst = objUser.st
    > strmail = objUser.mail
    > strwWWHomePage = objUser.wWWHomePage
    >
    >
    > Set objWord = CreateObject("Word.Application")
    >
    > Set objDoc = objWord.Documents.Add()
    > Set objSelection = objWord.Selection
    >
    > Set objEmailOptions = objWord.EmailOptions
    > Set objSignatureObject = objEmailOptions.EmailSignature
    >
    > Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
    >
    > objSelection.Font.Name = "Verdana"
    > objSelection.Font.Size = "10"
    >
    > objSelection.TypeText "Kind Regards,"
    > objSelection.TypeParagraph()
    >
    > objSelection.TypeText strName
    > objSelection.TypeParagraph()
    >
    > objSelection.Font.Size = "10"
    >
    > objSelection.TypeText strTitle & vbCrLf
    > objSelection.TypeText strCompany
    > objSelection.TypeParagraph()
    >
    > objSelection.Font.Size = "7,5"
    >
    > objSelection.TypeText "Tel.: "
    > objSelection.TypeText strPhone & vbCrLf
    > objSelection.TypeText strmail & vbCrLf
    > objSelection.TypeText strwWWHomePage
    > objSelection.TypeParagraph()
    >
    > objSelection.TypeText "disclaimer: "
    >
    > Set objSelection = objDoc.Range()
    >
    > objSignatureEntries.Add "AD Signature", objSelection
    > objSignatureObject.NewMessageSignature = "AD Signature"
    > objSignatureObject.ReplyMessageSignature = "AD Signature"
    >
    > objDoc.Saved = True
    > objWord.Quit
    VB Script provides you with three constants in this context:
    vbCRLF (carriage return & line feed, also called "paragraph marker")
    vbLF (line feed, i.e. start a new line)
    vbCR (carriage return, i.e. return to the start of the line)

    I suggest you use vbLF instead of vbCRLF.



      My System SpecsSystem Spec

  6. #5


    Al Dunbar Guest

    Re: New line in stead of new paragraph


    "Pegasus (MVP)" <I.can@xxxxxx> wrote in message
    news:uSPjlmTOJHA.4404@xxxxxx

    >
    > "Wendy" <Wendy@xxxxxx> wrote in message
    > news:9A13BE5D-0BBA-4CA5-B813-6D130CD467DE@xxxxxx

    >>> Let's have a look at your script.
    >>>
    >> This is the script
    >>
    >> Between the Title and the Company name i use the "& vbCrLf" option for
    >> the
    >> next line. But it stil behaves as a paragraph.
    >>
    >> =====
    >> On Error Resume Next
    >>
    >> Set objSysInfo = CreateObject("ADSystemInfo")
    >>
    >> strUser = objSysInfo.UserName
    >> Set objUser = GetObject("LDAP://" & strUser)
    >>
    >> strName = objUser.FullName
    >> strTitle = objUser.Title
    >> strCompany = objUser.Company
    >> strPhone = objUser.telephoneNumber
    >> strl = objUser.l
    >> strst = objUser.st
    >> strmail = objUser.mail
    >> strwWWHomePage = objUser.wWWHomePage
    >>
    >>
    >> Set objWord = CreateObject("Word.Application")
    >>
    >> Set objDoc = objWord.Documents.Add()
    >> Set objSelection = objWord.Selection
    >>
    >> Set objEmailOptions = objWord.EmailOptions
    >> Set objSignatureObject = objEmailOptions.EmailSignature
    >>
    >> Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
    >>
    >> objSelection.Font.Name = "Verdana"
    >> objSelection.Font.Size = "10"
    >>
    >> objSelection.TypeText "Kind Regards,"
    >> objSelection.TypeParagraph()
    >>
    >> objSelection.TypeText strName
    >> objSelection.TypeParagraph()
    >>
    >> objSelection.Font.Size = "10"
    >>
    >> objSelection.TypeText strTitle & vbCrLf
    >> objSelection.TypeText strCompany
    >> objSelection.TypeParagraph()
    >>
    >> objSelection.Font.Size = "7,5"
    >>
    >> objSelection.TypeText "Tel.: "
    >> objSelection.TypeText strPhone & vbCrLf
    >> objSelection.TypeText strmail & vbCrLf
    >> objSelection.TypeText strwWWHomePage
    >> objSelection.TypeParagraph()
    >>
    >> objSelection.TypeText "disclaimer: "
    >>
    >> Set objSelection = objDoc.Range()
    >>
    >> objSignatureEntries.Add "AD Signature", objSelection
    >> objSignatureObject.NewMessageSignature = "AD Signature"
    >> objSignatureObject.ReplyMessageSignature = "AD Signature"
    >>
    >> objDoc.Saved = True
    >> objWord.Quit
    >
    > VB Script provides you with three constants in this context:
    FOUR

    > vbCRLF (carriage return & line feed, also called "paragraph marker")
    > vbLF (line feed, i.e. start a new line)
    > vbCR (carriage return, i.e. return to the start of the line)
    vbNewline - defined to mean what the o/s considers an end of line indicator.

    >
    > I suggest you use vbLF instead of vbCRLF.
    Worth a try, but I'd suggest also trying vbNewline.

    /Al



      My System SpecsSystem Spec

  7. #6


    Wendy Guest

    Re: New line in stead of new paragraph

    In combination with the option

    objSelection.Style = "No Spacing"

    did the trick

    Tnx.


    "Pegasus (MVP)" wrote:

    >
    > "Wendy" <Wendy@xxxxxx> wrote in message
    > news:9A13BE5D-0BBA-4CA5-B813-6D130CD467DE@xxxxxx

    > >> Let's have a look at your script.
    > >>
    > > This is the script
    > >
    > > Between the Title and the Company name i use the "& vbCrLf" option for
    > > the
    > > next line. But it stil behaves as a paragraph.
    > >
    > > =====
    > > On Error Resume Next
    > >
    > > Set objSysInfo = CreateObject("ADSystemInfo")
    > >
    > > strUser = objSysInfo.UserName
    > > Set objUser = GetObject("LDAP://" & strUser)
    > >
    > > strName = objUser.FullName
    > > strTitle = objUser.Title
    > > strCompany = objUser.Company
    > > strPhone = objUser.telephoneNumber
    > > strl = objUser.l
    > > strst = objUser.st
    > > strmail = objUser.mail
    > > strwWWHomePage = objUser.wWWHomePage
    > >
    > >
    > > Set objWord = CreateObject("Word.Application")
    > >
    > > Set objDoc = objWord.Documents.Add()
    > > Set objSelection = objWord.Selection
    > >
    > > Set objEmailOptions = objWord.EmailOptions
    > > Set objSignatureObject = objEmailOptions.EmailSignature
    > >
    > > Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
    > >
    > > objSelection.Font.Name = "Verdana"
    > > objSelection.Font.Size = "10"
    > >
    > > objSelection.TypeText "Kind Regards,"
    > > objSelection.TypeParagraph()
    > >
    > > objSelection.TypeText strName
    > > objSelection.TypeParagraph()
    > >
    > > objSelection.Font.Size = "10"
    > >
    > > objSelection.TypeText strTitle & vbCrLf
    > > objSelection.TypeText strCompany
    > > objSelection.TypeParagraph()
    > >
    > > objSelection.Font.Size = "7,5"
    > >
    > > objSelection.TypeText "Tel.: "
    > > objSelection.TypeText strPhone & vbCrLf
    > > objSelection.TypeText strmail & vbCrLf
    > > objSelection.TypeText strwWWHomePage
    > > objSelection.TypeParagraph()
    > >
    > > objSelection.TypeText "disclaimer: "
    > >
    > > Set objSelection = objDoc.Range()
    > >
    > > objSignatureEntries.Add "AD Signature", objSelection
    > > objSignatureObject.NewMessageSignature = "AD Signature"
    > > objSignatureObject.ReplyMessageSignature = "AD Signature"
    > >
    > > objDoc.Saved = True
    > > objWord.Quit
    >
    > VB Script provides you with three constants in this context:
    > vbCRLF (carriage return & line feed, also called "paragraph marker")
    > vbLF (line feed, i.e. start a new line)
    > vbCR (carriage return, i.e. return to the start of the line)
    >
    > I suggest you use vbLF instead of vbCRLF.
    >
    >
    >

      My System SpecsSystem Spec


New line in stead of new paragraph
Similar Threads
Thread Forum
Line spacing (paragraph separation) fails sometimes Live Mail
Getting Word Paragraph Number VB Script
large E in stead of question mark Vista mail
When I type the words skip to previous paragraph Vista General
Paragraph.Text? Should there be a dependency property as well? Avalon