Script Help RRS feed

  • Question

  • Hi, I have some script that strips required numbers from the body of an incoming email and export the required fields as a text file.The problem I have is the 3 fields will export over 3 rows when opening in excel as below :

    Q. is there a way to export the text file all in 1 row by adding to the vbs so I get as below ?

    Thanks for any help in advance. the current VBS is below:

    sinput = Metadata.Values("EMAILBODY")

    p = Instr(a(2),"[")
    serialnumber = Left(a(2),p-1)
    p = Instr(a(5),"[")
    TCcounter= Left(a(5),p-1)
    p = Instr(a(6),"[")
    TBcounter= Left(a(6),p-1)

    Call Metadata.SetValues("SERIALNUMBER",serialnumber)
    Call Metadata.SetValues("TOTALCOLORCOUNTER",TCcounter)
    Call Metadata.SetValues("TOTALBLACKCOUNTER",TBcounter)

    • Edited by Ian Wallace71 Wednesday, November 7, 2018 1:36 PM
    • Moved by Bill_Stewart Thursday, January 3, 2019 4:04 PM Unanswerable drive-by question
    Wednesday, November 7, 2018 1:34 PM

All replies

  • Unfortunately our code and question do not make much sense.

    See the following for help with using a technical forum:

    You also need to post your code correctly using the code posting tool provided.


    Wednesday, November 7, 2018 1:39 PM
  • Basically , can my VB script be added too, to output the data in 1 row rather than under each other in 1 column ?
    Wednesday, November 7, 2018 2:19 PM
  • Your VBs does not export anything.  It also appears to do nothing.

    Please read the link I posted and try to ask a clear question. From you statement it is completely impossible to know what you are asking and your code makes no sense.

    Perhaps you should ask the author of the script to help you.

    When posting code please post using the code posting tool. Images of Excel files are not in ay way helpful.  A CSV file is a text file.  It is not an Excel file even though Excel can open it.

    Until you can post correct code and ask a clear question there is no way to help you. Note also that "script help" is not a question or a topic title which is why I want you to read the link and learn how to ask a technical question.

    Please read the link.


    Wednesday, November 7, 2018 2:52 PM