![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | Re: New line in stead of new paragraph "Wendy" <Wendy@xxxxxx> wrote in message news:E688A314-8927-4CD8-B742-882DFF304DE1@xxxxxx Quote: >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 Specs![]() |
| | #3 (permalink) |
| | Re: New line in stead of new paragraph > Let's have a look at your script. Quote: > 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 Specs![]() |
| | #4 (permalink) |
| | Re: New line in stead of new paragraph "Wendy" <Wendy@xxxxxx> wrote in message news:9A13BE5D-0BBA-4CA5-B813-6D130CD467DE@xxxxxx Quote: Quote: >> Let's have a look at your 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 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 Specs![]() |
| | #5 (permalink) |
| | Re: New line in stead of new paragraph "Pegasus (MVP)" <I.can@xxxxxx> wrote in message news:uSPjlmTOJHA.4404@xxxxxx Quote: > > "Wendy" <Wendy@xxxxxx> wrote in message > news:9A13BE5D-0BBA-4CA5-B813-6D130CD467DE@xxxxxx Quote: Quote: >>> Let's have a look at your 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: Quote: > 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) Quote: > > I suggest you use vbLF instead of vbCRLF. /Al |
My System Specs![]() |
| | #6 (permalink) |
| | Re: New line in stead of new paragraph In combination with the option objSelection.Style = "No Spacing" did the trick Tnx. "Pegasus (MVP)" wrote: Quote: > > "Wendy" <Wendy@xxxxxx> wrote in message > news:9A13BE5D-0BBA-4CA5-B813-6D130CD467DE@xxxxxx Quote: Quote: > >> Let's have a look at your 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 Specs![]() |
![]() |
| Thread Tools | |
| |
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 | |||