Re: Script to format file to character number locations?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Sean M. Loftus (me)_at_loftus.org)
Date: 01/18/05


Date: Tue, 18 Jan 2005 10:57:54 -0500

I'm getting a syntax error on this snippet...

UML_PSInputScript.VBS(111, 14) Microsoft VBScript compilation error: Syntax
error

Function FixLength(sText,iSize)
FixLength = Left(sText & Space(iSize), iSize)
End Function

"Sean M. Loftus" <sean(remove me)@loftus.org> wrote in message
news:eW3AT%23d%23EHA.3756@TK2MSFTNGP14.phx.gbl...
> I'm trying to write a vb script that will take each cell of an excel row
and
> place its text to start at a pre-designated character location. I have the
> excel scripting to read the cell and hold it in a variable, what I need is
a
> script that takes the variable and places it at character 1 or character
55
> etc.
>
> This is a Peoplesoft feed and it has to match the input file they need,
for
> example.
>
> First name starts at char 1
> Last name starts at char 15
> account starts at char 25
> email starts at char 50
>
> Their file is formatted into columns based on character location, so the
> word has to start at the pre-designated character in order to be read into
> the system properly. I can't get them to change the format of the input, I
> already went down that road...
>
> Thanks in advance.
>
> Sean M. Loftus
> Enterprise Architect
> Loftus Consulting
> www.LoftusConsulting.com
>
> sean(removeme)@loftus.org
>
>



Relevant Pages

  • Script to format file to character number locations?
    ... place its text to start at a pre-designated character location. ... script that takes the variable and places it at character 1 or character 55 ... First name starts at char 1 ... Their file is formatted into columns based on character location, ...
    (microsoft.public.scripting.vbscript)
  • script error in emails
    ... On some emails I receive i get the following error ... An error has occurred in the script on this page. ... Char: 1 ... Error: Syntax error ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Script error
    ... On almost every page I open, I recieve the message: ... An error has occured in the script on this page ... Char: 1 ... Error: Syntax Error ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Compilation / Syntax Error
    ... Char - 22 ... Error - Syntax Error ... Some - Msoft VB Script Compilation Error ...
    (microsoft.public.project)
  • Re: Ping:*Bob* Re: Internet Explorer 7
    ... An error has occurred in the script on this page. ... Error: Syntax error ... Do you want to continue running scripts on this page? ... Char: 142 ...
    (microsoft.public.windows.vista.general)