Script to autoflow multiple text files?

A publisher I'm working with is being slowed down by a necessary change to their workflow. Maybe there's a script around to help? I've looked but can't find any, so I'm posting here.
Old workflow: Designers would autoflow a single, large Word doc that contained all front matter (sometimes >10 diff. sections) and chapters and endnotes into a book template.
New workflow: The Word doc is now broken up into 30-40 InCopy files, still destined for a single InDesign layout doc. (The InCopy files were created from a tagged Word doc by a different system, so they're all new to the InDesign user.)
Is there a script that, after the designers load a Place cursor with the 30-40 files (in the correct order), will allow them to single-click on page 1, and InDesign will place one after the other of the files, autoflowing as necessary? They still need them to be placed as individual InCopy files (so concatenating first wouldn't help). I don't think there would ever be a case of 2 stories being on the same page.
thanks,
AM

Hi AnneMarie,
This script will allow you to select a bunch of files, and will attempt to place them, one by one, into your InDesign document. It will auto-flow them as needed (although watch out for permanent overset problems -- because the script does not test for that).
I've tested this with a bunch of assets, but not with InCopy files because I don't have any. If they're placeable like Word documents, the script should run fine.
Let us know if it all works properly for you.
// BS"D
// Multi-file auto-place
// An InDesign Script by Ariel, (c) Id-Extras.com, 2014
// This script will allow the user to select a bunch of placeable files (Word docs, etc.)
// It will then attempt to place and auto-flow all the selected files.
// The script will start from page 1 of the active document
// and keep adding pages as needed.
// It will add text frames as needed, within the margins of the page.
// IMPORTANT: There is no error-checking for perpetual overflow!!!
// So, if something you're trying to place cannot fit within the margins,
// The script will continue adding pages to InDesign until it crashes.
// To quit the script, press ESC.
var myDoc = app.activeDocument,
myFiles = File.openDialog("Select files to place...", undefined, true),
i,
currentPage = myDoc.pages[0],
prevFrame,
myFrame;
for (i = 0; i < myFiles.length; i++){
myFrame = addFrame(currentPage);
myFile = myFiles[i];
try{
  myFrame.place(myFile, false);
catch(e){
  alert("Unable to place file: "+myFile, "Multi-file auto-place");
  continue;
while (myFrame.overflows){
  currentPage = addPageAfter(currentPage);
  prevFrame = myFrame;
  myFrame = addFrame(currentPage);
  prevFrame.nextTextFrame = myFrame;
currentPage = addPageAfter(currentPage);
function addFrame(aPage){
var pageMargins = aPage.marginPreferences,
  aFrame = aPage.textFrames.add(),
  areFacing = app.activeDocument.documentPreferences.facingPages,
  myTop = aPage.bounds[0]+pageMargins.top,
  myBottom = aPage.bounds[2]-pageMargins.bottom,
  myLeft = aPage.bounds[1]+pageMargins.left,
  myRight = aPage.bounds[3]-pageMargins.right;
//When document.documentPreferences.facingPages == true,
//"left" means inside; "right" means outside.
if (areFacing && aPage.side == PageSideOptions.LEFT_HAND){
   myLeft = aPage.bounds[1]+pageMargins.right;
   myRight = aPage.bounds[3]-pageMargins.left;
aFrame.geometricBounds = [myTop, myLeft, myBottom, myRight];
return aFrame;
function addPageAfter(aPage){
return myDoc.pages.add(LocationOptions.AFTER, aPage);

Similar Messages

  • Setting Font for converting multiple text files into PDF using VB 6.0

    Dear All,
    Am converting multiple text files into PDF using VB6.0. Currently, am unable to control the font face and size for the generated files. Below is the procedure am using for each file;
    Public Sub proc_convert_to_PDF(srcFilename As String, destFilename As String)
    Dim p_AcroApp As CAcroApp
    Dim p_VDoc As CAcroAVDoc
    Dim p_DDoc As CAcroPDDoc
    Dim IsOk As Boolean
    Set p_AcroApp = CreateObject("AcroExch.App")
    Set p_VDoc = CreateObject("AcroExch.AVDoc")
    Call p_VDoc.Open(srcFilename, "")
    Set p_VDoc = p_AcroApp.GetActiveDoc
    If p_VDoc.IsValid Then
    Set p_DDoc = p_VDoc.GetPDDoc
    ' Fill in pdf properties.
    p_DDoc.SetInfo "Title", Format(Date, "dd-mm-yyy")
    p_DDoc.SetInfo "Subject", srcFilename
    If p_DDoc.Save(1 Or 4 Or 32, destFilename) <> True Then
    MsgBox "Failed to save " & srcFilename
    End If
    p_DDoc.Close
    End If
    'Close the PDF
    p_VDoc.Close True
    p_AcroApp.Exit
    'Clear Variables
    Set p_DDoc = Nothing
    Set p_VDoc = Nothing
    Set p_AcroApp = Nothing
    End Sub
    What I need;
    1) to be able to set the font face of the destination file ( destFilename)
    2) to be able to set the font size of the destination file ( destFilename)
    Am using Adobe Acrobat 7.0 Type Library
    Kindly Help.
    Thanks in advance

    We didn't say it doesn't work. We said it isn't supported.
    There are a number of other ways to make a PDF. The one which would
    give the most control is if your application directly printed to GDI,
    controlling the font directly. This could print to Adobe PDF.
    You could look for an application that gives control of font for
    printing.
    You could use a text-to-PostScript system and distill the result. You
    could even look for a non-Adobe text-to-PDF.
    Working in the unsupported and dangerous world you chose, the font
    size for text conversion is set (and this is very bad design from
    Adobe) in the settings for Create PDF > From Web Page. There is no API
    to this.
    Aandi Inston

  • Generating multiple text files.

    Dose anyone know how to output multiple text files using XSLT.

    Dear Rony,
    I am facing the same problem, have u got the sollution. if u resoled please let me know.
    requesting you
    Thanks&Regards
    Srini

  • Read multiple text files and sort them

    I am trying to read multiple text files and store the data from the file in vector.
    but for days. I am with no luck. anyone can help me out with it? any idea of how to sort them will be appreciated.
    Below is part of the code I implemented.
    public class packet {
        private int timestamp;
        private int user_id;
        private int packet_id;
        private int packet_seqno;
        private int packet_size;
        public packet(int timestamp0,int user_id0, int packet_id0,int packet_seqno0, int packet_size0)
            timestamp = timestamp0;
            user_id=user_id0;
            packet_id=packet_id0;
            packet_seqno=packet_seqno0;
            packet_size=packet_size0;
        public void setTime(int atimestamp)
            this.timestamp=atimestamp;
        public void setUserid(int auserid)
            this.user_id=auserid;
        public void setPacketid(int apacketid)
            this.packet_id=apacketid;
        public void setPacketseqno(int apacketseqno)
            this.packet_seqno=apacketseqno;
        public void setPacketsize(int apacketsize)
            this.packet_size=apacketsize;
        public String toString()
            return timestamp+"\t"+user_id+"\t"+packet_id+"\t"+packet_seqno+"\t"+packet_size+"\t";
    }Here is the data from part of the text files. ( the first column is timestamp, second is userid, third is packetid.....)
    0 1 1 1 512
    1 2 1 2 512
    2 3 1 3 512
    3 4 1 4 512
    4 5 1 5 512
    5 6 1 6 512
    6 7 1 7 512
    7 8 1 8 512
    8 9 1 9 512
    9 10 1 10 512
    10 1 2 11 512
    11 2 2 12 512
    12 3 2 13 512
    13 4 2 14 512
    14 5 2 15 512
    15 6 2 16 512
    16 7 2 17 512

    Here's a standard idiom for object-list-sorting:
    /* cnleafdata.txt *********************************************
    0 1 1 1 512
    1 2 1 2 512
    2 3 1 3 512
    3 4 1 4 512
    4 5 1 5 512
    5 6 1 6 512
    6 7 1 7 512
    7 8 1 8 512
    8 9 1 9 512
    9 10 1 10 512
    10 1 2 11 512
    11 2 2 12 512
    12 3 2 13 512
    13 4 2 14 512
    14 5 2 15 512
    15 6 2 16 512
    16 7 2 17 512
    import java.util.*;
    import java.io.*;
    public class Packet implements Comparable<Packet>{
      private int timeStamp;
      private int userId;
      private int packetId;
      private int packetSeqno;
      private int packetSize;
      public Packet(int timeStamp0, int userId0, int packetId0,
       int packetSeqno0, int packetSize0) {
        timeStamp = timeStamp0;
        userId = userId0;
        packetId = packetId0;
        packetSeqno = packetSeqno0;
        packetSize = packetSize0;
      public Packet(String timeStamp0, String userId0, String packetId0,
       String packetSeqno0, String packetSize0) {
        this(Integer.parseInt(timeStamp0), Integer.parseInt(userId0),
         Integer.parseInt(packetId0), Integer.parseInt(packetSeqno0),
         Integer.parseInt(packetSize0));
      public Packet(String[] a){
        this(a[0], a[1], a[2], a[3], a[4]);
      public void setTime(int aTimeStamp){
        timeStamp = aTimeStamp;
      public void setUserId(int aUserId){
        userId = aUserId;
      public void setPacketId(int aPacketId){
        packetId = aPacketId;
      public void setPacketSeqno(int aPacketSeqno){
        packetSeqno = aPacketSeqno;
      public void setPacketSize(int aPacketSize){
        packetSize = aPacketSize;
      public int getUserId(){
        return userId;
      public String toString(){
        return String.format
    ("%2d %2d %2d %2d %4d", timeStamp, userId, packetId, packetSeqno, packetSize);
      public int compareTo(Packet otherPacket){
        return userId - otherPacket.getUserId();
      /* main for test */
      public static void main(String[] args){
        String line;
        ArrayList<Packet> alp;
        alp = new ArrayList<Packet>();
        try{
          BufferedReader br = new BufferedReader(new FileReader("cnleafdata.txt"));
          while ((line = br.readLine()) != null){
            // if (! recordValid(line)){
            //   continue;
            String[] ar = line.split("\\s");
            alp.add(new Packet(ar));
        catch (Exception e){
          e.printStackTrace();
        System.out.println("[original]");
        for (Packet p : alp){
          System.out.println(p);
        System.out.println();
        Collections.sort(alp);
        System.out.println("[sorted by user ID]");
        for (Packet p : alp){
          System.out.println(p);
    }

  • Script to merge multiple CSV files together with no duplicate records.

    I like a Script to merge multiple CSV files together with no duplicate records.
    None of the files have any headers and column A got a unique ID. What would be the best way to accomplish that?

    OK here is my answer :
    2 files in a directory with no headers.
    first column is the unique ID, second colomun you put whatever u want
    The headers are added when using the import-csv cmdlet
    first file contains :
    1;a
    2;SAMEID-FIRSTFILE
    3;c
    4;d
    5;e
    second file contains :
    6;a
    2;SAMEID-SECONDFILE
    7;c
    8;d
    9;e
    the second file contains the line : 2;b wich is the same in the first file
    the code :
    $i = 0
    Foreach($file in (get-childitem d:\yourpath)){
    if($i -eq 0){
    $ref = import-csv $file.fullname -Header id,value -Delimiter ";"
    }else{
    $temp = import-csv $file.fullname -Header id,value -Delimiter ";"
    foreach($line in $temp){
    if(!($ref.id.contains($line.id))){
    $objet = new-object Psobject
    Add-Member -InputObject $objet -MemberType NoteProperty -Name id -value $line.id
    Add-Member -InputObject $objet -MemberType NoteProperty -Name value -value $line.value
    $ref += $objet
    $i++
    $ref
    $ref should return:
    id                                                         
    value
    1                                                          
    a
    2                                                          
    SAMEID-FIRSTFILE
    3                                                          
    c
    4                                                          
    d
    5                                                          
    e
    6                                                          
    a
    7                                                          
    c
    8                                                          
    d
    9                                                          
    e
    (get-childitem d:\yourpath) -> yourpath containing the 2 csv file

  • Scheduling multiple tab BO XI3 report needs to save into multiple text file

    Hi,
    I have BO XI 3 Desktop Intelligence reports, those reports contains multiple tabs. Once after scheduling these reports the output needs to save as different text files (each tab as separate text file). Generally when select output as text file we will get the text file with the data of current tab, but in this scenario I want all the tabs data into different text files. I guess we can do this with macro. But I am not good in macro development, hope somebody can help me.
    Could you please help out for the same!
    Thanks,
    Rama

    Thanks Dan.. I made chenges in code as per your suggestion.. its working fine in DeskI -> local PC
    But this is not working in InfoView level... when i scheduled the same report its not saving into multiple text files... can you please have look...
    macro code as follows:-
    Public Sub SaveAsText()
    Dim StrTxtPath As String
    Dim BusDoc As busobj.Document
    Set BusDoc = ThisDocument
    Dim BusRep As Report
    Dim I As Integer
    On Error GoTo ErrHandler
    'StrTxtPath = "
    xxxx.xxx.xxx.com\common\Reporting\"
    StrTxtPath = "D:\Business Objects\Test_Macro\"
    For I = 1 To BusDoc.Reports.Count
    Set BusRep = BusDoc.Reports.Item(I)
    BusRep.ExportAsText (StrTxtPath & BusRep.Name)
    Next I
    ErrHandler:
    Exit Sub
    End Sub
    When i run this macro through DeskI.. its saving the report as multiple .txt files with respective number of tabs... but the same thing is not working when i tried in scheduling...
    Can you please suggest me what are the changes needs to be done...
    Thanks in Advance
    Thanks,
    Rama

  • Load multiple text files

    Hey!
    Does anybody can help me to make an Excel VBA macro code in order to import data from text files into one Excel spread sheet? I want to create User Form with dropdown list where user can select start and end date of interest and macro code
    will import bunch of text files depending on user demands... I am thinking to omit time tail (meaning that user can only specify date and I will add filename tail in macro code).
    My text files are named: 20130619004948DataLog.txt (meaning: yyyy mm dd hh mm ss). Text file contains recordings for each 15 seconds... It would be great to omit time tail (meaning that user can only specify date) and make additional macro to add the time
    tail to the file name, since it does not change from day to day. Text files for one day of interest (I have text files covering whole year):
    20130619004948DataLog.txt
    20130619014948DataLog.txt
    20130619024948DataLog.txt
    20130619034948DataLog.txt
    20130619044948DataLog.txt
    20130619054948DataLog.txt
    20130619064948DataLog.txt
    20130619074948DataLog.txt
    20130619084948DataLog.txt
    20130619094948DataLog.txt
    20130619104948DataLog.txt
    20130619114948DataLog.txt
    20130619124948DataLog.txt
    20130619134948DataLog.txt
    20130619144948DataLog.txt
    20130619154948DataLog.txt
    20130619164948DataLog.txt
    20130619174948DataLog.txt
    20130619184948DataLog.txt
    20130619194948DataLog.txt
    20130619204948DataLog.txt
    20130619214948DataLog.txt
    20130619224948DataLog.txt
    20130619234948DataLog.txt

    I am pretty sure this same question was asked about 2 weeks ago, and that one never got an answer.  How about this?
    Sub Read_Text_Files()
    Dim sPath As String
    Dim oPath, oFile, oFSO As Object
    Dim r, iRow As Long
    Dim wbImportFile As Workbook
    Dim wsDestination As Worksheet
    'Files location
    sPath = "C:\Test\"
    Set wsDestination = ThisWorkbook.Sheets("Sheet1")
    r = 8
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    Set oPath = oFSO.GetFolder(sPath)
    Application.ScreenUpdating = False
    For Each oFile In oPath.Files
    If LCase(Right(oFile.Name, 4)) = ".txt" Then
    'open file to impor
    Workbooks.OpenText Filename:=oFile.Path, Origin:=65001, StartRow:=1, DataType:=xlDelimited, _
    TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, FieldInfo:=Array(1, 1), _
    TrailingMinusNumbers:=True
    Set wbImportFile = ActiveWorkbook
    For iRow = 1 To wbImportFile.Sheets(1).UsedRange.Rows.Count
    wbImportFile.Sheets(1).Rows(iRow).Copy wsDestination.Rows(r)
    r = r + 1
    Next iRow
    wbImportFile.Close False
    Set wbImportFile = Nothing
    End If
    Next oFile
    End Sub
    Or, this.
    Sub TxtImporter()
    Dim f As String, flPath As String
    Dim i As Long, j As Long
    Dim ws As Worksheet
    Application.DisplayAlerts = False
    Application.ScreenUpdating = False
    flPath = ThisWorkbook.Path & Application.PathSeparator
    i = ThisWorkbook.Worksheets.Count
    j = Application.Workbooks.Count
    f = Dir(flPath & "*.txt")
    Do Until f = ""
    Workbooks.OpenText flPath & f, _
    StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
    ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=True, _
    Space:=False, Other:=False, TrailingMinusNumbers:=True
    Workbooks(j + 1).Worksheets(1).Copy After:=ThisWorkbook.Worksheets(i)
    ThisWorkbook.Worksheets(i + 1).Name = Left(f, Len(f) - 4)
    Workbooks(j + 1).Close SaveChanges:=False
    i = i + 1
    f = Dir
    Loop
    Application.DisplayAlerts = True
    End Sub
    That's just a generic sample.  So, basically, I'd modify the code like this.
    Sub TxtImporter()
    Dim f As String, flPath As String
    Dim i As Long, j As Long
    Dim ws As Worksheet
    Application.DisplayAlerts = False
    Application.ScreenUpdating = False
    'flPath = ThisWorkbook.Path & Application.PathSeparator
    flPath = "C:\Users\Ryan\Desktop\Dates\"
    i = ThisWorkbook.Worksheets.Count
    j = Application.Workbooks.Count
    f = Dir(flPath & "*.txt")
    VAL1 = ThisWorkbook.Sheets("Sheet1").Cells(1, 1).Value
    VAL2 = ThisWorkbook.Sheets("Sheet1").Cells(1, 2).Value
    f = Left(f, 8)
    If f = VAL1 And f = VAL2 Then
    Do Until f = ""
    Workbooks.OpenText flPath & f, _
    StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
    ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=True, _
    Space:=False, Other:=False, TrailingMinusNumbers:=True
    Workbooks(j + 1).Worksheets(1).Copy After:=ThisWorkbook.Worksheets(i)
    ThisWorkbook.Worksheets(i + 1).Name = Left(f, Len(f) - 4)
    Workbooks(j + 1).Close SaveChanges:=False
    i = i + 1
    f = Dir
    Loop
    End If
    Application.DisplayAlerts = True
    End Sub
    That will NOT work, because I don't know how you want to handle the time and 'DataLog.txt' part of the file name.  Just decide what you want to do with that part of it, and modify the code appropriately.
    Also, I'm assuming the dates (without times) are in A1 and B1 in Sheet1.
    I think this gets you 99% of the way there.  Post back if you have specific questions.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Place multiple text files

    I don't know if anyone else has experienced this, but often, when I want to place multiple Word files, it places the same text.
    Even just now, I changed my preferences to link to the files so I can see the name of the file I was placing in the Links palette, and if I look at articles 35 and 37 for example, the link is to the right file but the text imported is exactly the same (text from article 35). Even article 39 has the text from 35. But others are fine and have the right text imported.
    A while ago when I first experienced this, I realised that if I checked Show import options in the Place dialog box, it would actually import all the different texts, but it didn't seem to work this time. Maybe I clicked OK too fast at each of the Import options dialog boxes (quite annoying actually, I just don't see why it has to come up for every file, once is enough).
    Any idea how to fix this?
    The place multiple feature is great, but only if it works correctly.

    A shortcut to perhaps the prolem is to go "around" the live-edit workflow and just focus on the .indd file.
    Take a look att this plug-in, http://www.ctrl-ps.com/products/ctrlcrosstalk

  • How to i read multiple text files one bye one

    hi all
    I need to select the text files multiple times and read files one by one
    some how i managed to select the one text file and scan the data in the text file
    i need to do this for mutiple files at the same time
    please help me
    Solved!
    Go to Solution.

    gowthamggk wrote:
    i sucessfully reading one text file through this VI
    but as like this .. i need for multiple files
    Why are you not using For loop???
    gowthamggk wrote:
    also shld read the text line by line
    You can right click the 'Read from Text File' function and select 'Read Lines'. Refer to below code snippet.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • VBScript for parsing multiple text files

    Hi,
    I have around 175 text files that contain inventory information that I am trying to parse into an Excel file. We are upgrading our Office platform from 2003 to 2010 and my boss wants to know which machines will have trouble supporting it. I found a script
    that will parse a single text file based upon ":" as the delimiter and I'm having trouble figuring out how to change it to open an entire folder of text files and write all of the data to a single Excel spreadsheet. Here is an example of the text
    file I'll be parsing. I'm interested in the "Memory and Processor Information" and "Disk Drive Information" sections mainly.
    ABEHRENS-XP Computer Inventory
    OS Information
    OS Details
    Caption: Microsoft Windows XP Professional
    Description:
    InstallDate: 20070404123855.000000-240
    Name: Microsoft Windows XP Professional|C:\WINDOWS|\Device\Harddisk0\Partition1
    Organization: Your Mom
    OSProductSuite:
    RegisteredUser: Bob
    SerialNumber: 55274-640-3763826-23029
    ServicePackMajorVersion: 3
    ServicePackMinorVersion: 0
    Version: 5.1.2600
    WindowsDirectory: C:\WINDOWS
    Memory and Processor Information
    504MB Total memory HOW CAN I PULL THIS WITHOUT ":" ALSO
    Computer Model: HP d330 uT(DG291A)
    Processor:               Intel(R) Pentium(R) 4 CPU 2.66GHz
    Disk Drive Information
    27712MB Free Disk Space ANY WAY TO PULL THIS WITHOUT ":"
    38162MB Total Disk Space
    Installed Software
    Here is the start of the script I have so far. . .
    Const ForReading = 1
    Set objDict = CreateObject("Scripting.Dictionary")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objTextFile = objFSO.OpenTextFile("C:\Test\test.txt" ,ForReading)
    WANT THIS TO BE C:\Test
    Do Until objTextFile.AtEndOfStream
    strLine = objTextFile.ReadLine
    If Instr(strLine,":") Then
    arrSplit = Split(strLine,":") IS ":" THE BEST DELIMITER TO USE?
    strField = arrSplit(0)
    strValue = arrSplit(1)
    If Not objDict.Exists(strField) Then
    objDict.Add strField,strValue
    Else
    objDict.Item(strField) = objDict.Item(strField) & "||" & strValue
    End If
    End If
    Loop
    objTextFile.Close
    Set objExcel = CreateObject("Excel.Application")
    objExcel.Visible = True
    objExcel.Workbooks.Add
    intColumn = 1
    For Each strItem In objDict.Keys
    objExcel.Cells(1,intColumn) = strItem
    intColumn = intColumn + 1
    Next
    intColumn = 1
    For Each strItem In objDict.Items
    arrValues = Split(strItem,"||")
    intRow = 1
    For Each strValue In arrValues
    intRow = intRow + 1
    objExcel.Cells(intRow,intColumn) = strValue
    Next
    intColumn = intColumn + 1
    Next
    Thank you for any help.

    You are The Bomb.com! I had to play around with it to pull some additional data (model and processor) and then write a quick macro to remove the unwanted text and finally I wanted the data to write in columns instead of rows so this is what I ended up with:
    Option Explicit
    Dim objFSO, objFolder, strFolder, objFile
    Dim objReadFile, strLine, objExcel, objSheet
    Dim intCol, strExcelPath
    Const ForReading = 1
    strFolder = "c:\Test"
    strExcelPath = "c:\Test\Inventory.xlsx"
    Set objExcel = CreateObject("Excel.Application")
    objExcel.Workbooks.Add
    Set objSheet = objExcel.ActiveWorkbook.Worksheets(1)
    intCol = 0
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFolder = objFSO.GetFolder(strFolder)
    For Each objFile In objFolder.Files
      intCol = intCol + 1
      Set objReadFile = objFSO.OpenTextFile(objFile.Path, ForReading)
      Do Until objReadFile.AtEndOfStream
        strLine = objReadFile.ReadLine
        If (InStr(strLine, "Computer Inventory") > 0) Then
          objSheet.Cells(intCol, 1).Value = Left(strLine, InStr(strLine, "Computer Inventory") - 2)
        End If
        If (InStr(strLine, "Total memory") > 0) Then
          objSheet.Cells(intCol, 2).Value = Left(strLine, InStr(strLine, "Total memory") - 2)
        End If
        If (InStr(strLine, "Computer Model:") > 0) Then
          objSheet.Cells(intCol, 3).Value = (strLine)
        End If
        If (InStr(strLine, "Processor:") > 0) Then
          objSheet.Cells(intCol, 4).Value = (strLine)
        End If
        If (InStr(strLine, "Total Disk Space") > 0) Then
          objSheet.Cells(intCol, 5).Value = Left(strLine, InStr(strLine, "Total Disk Space") - 2)
        End If
        If (InStr(strLine, "Free Disk Space") > 0) Then
          objSheet.Cells(intCol, 6).Value = Left(strLine, InStr(strLine, "Free Disk Space") - 2)
        End If
      Loop
    Next
    objExcel.ActiveWorkbook.SaveAs strExcelPath
    objExcel.ActiveWorkbook.Close
    objExcel.Quit
    Thanks again!
    Hi ,
    I am have very basic knowledge about VB scripting, but this code could be the perfect solution i am looking for. could you guide me exactly how to run and test the same , i would be really thankful for your kind and generous support on this.
    Thanks ,
    Veer

  • Insert multiple text files to multiple tables that have different table structures

    Hi All,
    I have a small problem. I have lots of text files in a folder location. Say for an example Company.txt, Code.txt. I need to insert all these files to tables similar to the file structure. Company file to Company table and Code file to Code table. The catch
    is that all these table structures differ one to another.
    How can i do this using SSIS? I guess using a for each loop with some data flow task would be a start.
    Can some body give me a step by step example on how i can achieve this.
    Thanks
    LM

    It is very complicated to accomplish the above requirement using the standard Data Flow Task. You have to essentially setup a separate task for each table layout. If you can use third-party solutions, check the commercial CozyRoc
    Data Flow Task Plus. It is an extension of the standard Data Flow Task, with ability to do dynamic data flows at runtime. You can load all your tables and layouts with only one Data Flow Task. The other benefit is the solution doesn't require programming.SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • Script to paste multiple text to respective x,y coordinate

    i need to formulate a script indesign, where upon pasting multiple texts or textframes, they will be pasted at their respective coordinates x and y with reference to margin or the zero point, I have read the indesign javascript reference, but i could not implement or make this one.  A few codes on how this can be done will be appreciated thanks.  Additional information, i am copying the text from pdf source.  I am currently using adobe indesign cs3.  thanks again

    I think is too much overhead to put 500 labels on the screen, and more if you have to put them in determinated coordenates, having IMHO the same or more memory use. I recommend you to use cursors, even with 500 labels (is that a cinemascope screen?).

  • Use splitter to create multiple text file

    Hello I have one view as source and would like to create multiple target text files based on different condition. What I am doing is that I am using SPLITTER which contain one INGRP1 and three OUTGRP( nameley TR1, TR2 and TR3) and one default REMAINING_ROWS ( what is the purpose of the REMAINING_ROWS?). So I mapped view to INGRP1 of the splitter and then added the different SPLITT condition in the condition wizard, for example :
    for TR1
    COMMISSION_TYPE='P' and
    rownum <= 65000
    for TR2
    COMMISSION_TYPE='P' and
    rownum > 65000
    and for TR3
    COMMISSION_TYPE='A'
    After this since I have to create 3 comma delimted text files, I have used 3 expression for each individual splitt condition. In the expression what I am doing is that I am just concating all the fileds and then output of each expression goes to three different text files.
    When I am deploying the mapping, it is coming up several errors such as :
    1): PLS-00201: identifier 'COMMISSION_TYPE' must be declared
    (2): PL/SQL: Statement ignored
    (3): PLS-00201: identifier 'COMMISSION_TYPE' must be declared
    (4): PL/SQL: Statement ignored
    (5): PLS-00201: identifier 'COMMISSION_TYPE' must be declared
    (6): PL/SQL: Statement ignored
    (7): PLS-00201: identifier 'START_INDEX' must be declared
    (8): PL/SQL: Statement ignored
    (9): PLS-00201: identifier 'T_EXPR_ASSET_1_OUTPUT_ASSET$0' must be declared
    (10): PL/SQL: Item ignored
    (11): PLS-00201: identifier 'T_ROWKEY_SPLIT_2' must be declared
    (12): PL/SQL: Item ignored
    (13): PLS-00201: identifier 'T_CPPASSET_0_OUTPUT_ASSET$0' must be declared
    (14): PL/SQL: Item ignored
    (15): PLS-00801: internal error [21076]
    (16): PL/SQL: Item ignored
    (17): PLS-00801: internal error [21076]
    (18): PL/SQL: Item ignored
    (19): PLS-00801: internal error [21076]
    (20): PL/SQL: Item ignored
    Why I am getting these errors, why OWB generated code could not identify COMMISSION_TYPE filed?
    Please help me.
    Suhail

    I am really very very sorry, its my fault. I was not mapping COMMISSION_TYPE from view to splitter.

  • Taking Table script back up in text file

    Hi:
    One of my customer has Oracle 8 running on IBM AIX. I need to take their table sript back up in form of a text file. Could anyone please walk me through the
    commands on IBM AIX for the above?
    Thanks - Prabir.

    What version of Oracle are they running? "Oracle 8" could refer to anything from 8.0.3 to 8.1.7.
    What is a "table script backup"? The DDL to recreate their tables? Or something else?
    Does it really need to be a human readable text file? Or would a binary export file be sufficient?
    Justin

  • How do I create multiple text files from a list in another file?

    I have a text file with data in it:
    1. Bristol
    2. Bath
    3. Exeter
    etc
    I want to run an action which outputs the following files:
    1.txt (contents: 1 Bristol)
    2.txt (contents: 2.Bath)
    3.txt (contents: 3.Exeter)
    I can't work ou how to do this, any help appreciated. Thanks
    Dave

    Hi mate, thanks for the suggestion.  I saw that section in the user guide - but it is only for copying from one library to another - I want to copy from an FCP library to a file structure OUTSIDE FCP.  I have had problems with FCP losing media when copying to another library so I just want the files in the Finder where I can see them...
    Stephen

Maybe you are looking for