• insert a carriage return.. (excel 2000)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » insert a carriage return.. (excel 2000)

    Author
    Topic
    #400101

    Messaggio cancellato da sal21

    Viewing 3 reply threads
    Author
    Replies
    • #778085

      This seems very consistent. There is a line of 132 hyphens (-), then a space, then the next line. You could look for a pattern such as ———- plus space and replace that with ———- plus a CRLF pair plus space.

      It would be cumbersome to load Word just to do that, so as an alternative you could use Replace on a really huge string or you could do a file operation (I don’t know the code for that, but I’m sure there is a way, perhaps using VBScripts Regular Expressions object).

      Maybe if you get the original report to only have 131 – characters in a row, it will fix itself?

    • #778086

      This seems very consistent. There is a line of 132 hyphens (-), then a space, then the next line. You could look for a pattern such as ———- plus space and replace that with ———- plus a CRLF pair plus space.

      It would be cumbersome to load Word just to do that, so as an alternative you could use Replace on a really huge string or you could do a file operation (I don’t know the code for that, but I’m sure there is a way, perhaps using VBScripts Regular Expressions object).

      Maybe if you get the original report to only have 131 – characters in a row, it will fix itself?

    • #778205

      Hi Sal,

      The last thing I would wish to do is sent you away from this forum, but I suspect you might be better off asking your questions in Italian, right?

      Try this site, it is the Italian Microsoft Newsgroup on Excel

      • #778593

        Now look what you’ve done! Hope this wasn’t because Sal took offence.
        Cheers

        Cheers,
        Paul Edstein
        [Fmr MS MVP - Word]

        • #778597

          From last night’s digest:[indent]


          Subject: insert a carriage return.. (excel 2000) [#338805]
          Poster: sal21
          Posted on: 02-Feb-04 21:50

          .. acarriage return.

          This file is generated from an CICS/HOST Application.
          Not all line of this are longer 132.
          I dont know the reason?????

          My problem:

          Count 132 charatter for every line and put a carriage return if many line as to big out of 132 character
          Is pssible whit a macro to make this and end sub and to save as with overwrith the original file or save in another position of Hdisk?
          If you want make also an import in a sheet of excel and make a macro…

          Attachment: censored


          [/indent]If you must know. grin

          • #778599

            Thanks Jefferson,

            I had seen the original post, so I remembered its gist. Glad you had a copy of the benefit of others though.

            Cheers

            Cheers,
            Paul Edstein
            [Fmr MS MVP - Word]

            • #778666

              I am sooo glad to see some of us keep record of what’s in here evilgrin .
              I wouldn’t have known what to do with my day today without being able to read Sal’s original post, thanks.

            • #778667

              I am sooo glad to see some of us keep record of what’s in here evilgrin .
              I wouldn’t have known what to do with my day today without being able to read Sal’s original post, thanks.

          • #778600

            Thanks Jefferson,

            I had seen the original post, so I remembered its gist. Glad you had a copy of the benefit of others though.

            Cheers

            Cheers,
            Paul Edstein
            [Fmr MS MVP - Word]

        • #778598

          From last night’s digest:[indent]


          Subject: insert a carriage return.. (excel 2000) [#338805]
          Poster: sal21
          Posted on: 02-Feb-04 21:50

          .. acarriage return.

          This file is generated from an CICS/HOST Application.
          Not all line of this are longer 132.
          I dont know the reason?????

          My problem:

          Count 132 charatter for every line and put a carriage return if many line as to big out of 132 character
          Is pssible whit a macro to make this and end sub and to save as with overwrith the original file or save in another position of Hdisk?
          If you want make also an import in a sheet of excel and make a macro…

          Attachment: censored


          [/indent]If you must know. grin

      • #778594

        Now look what you’ve done! Hope this wasn’t because Sal took offence.
        Cheers

        Cheers,
        Paul Edstein
        [Fmr MS MVP - Word]

    • #778206

      Hi Sal,

      The last thing I would wish to do is sent you away from this forum, but I suspect you might be better off asking your questions in Italian, right?

      Try this site, it is the Italian Microsoft Newsgroup on Excel

    Viewing 3 reply threads
    Reply To: insert a carriage return.. (excel 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: