+ Reply to Thread
Results 1 to 2 of 2

RE: EXCEL, WORD Automation

  1. #1
    lumpjaw
    Guest

    RE: EXCEL, WORD Automation

    Greetings all!

    I have a project I am working on that I need help with, I am not sure how to
    go about explaining it so I will just provide a scenario and hope someone
    knows what I am talking about.

    I work in an environment where I create the same files over and over with
    new directiories. Here is what I want to do.

    I create folders that have a unique name, let's say 'job number'
    I have three subfolders (not unique)
    I have an excel file which contains information in the file 'job number',
    the file name itself is also includeing the job number.
    I have a word file that is similar to the excel file.

    I want to create a script that will create the folder with job name, the sub
    folders, excel & word documents with the file name including the job number
    and also information in the file (let's say to a text field).

    Is there any good way to do this? Thanks for the help.

    --

    Please post your responses to this newsgroup so that
    we may all learn from your expertise.

    -lumpjaw



  2. #2
    Dave Patrick
    Guest

    Re: EXCEL, WORD Automation

    Tale a look at the FileSysyemObject of VBScript
    http://www.microsoft.com/technet/scr...s/default.mspx

    You can read from excel in your script something like;

    Option Explicit
    Dim filePath, oExcel, oSheet
    filePath = "c:\Test.xls"
    Set oExcel = CreateObject("Excel.Application")
    oExcel.Workbooks.Open(filepath)
    Set oSheet = oExcel.ActiveWorkbook.Worksheets(1)
    MsgBox oSheet.Cells(1, 1)
    oExcel.DisplayAlerts = False
    oExcel.ActiveWorkbook.Close
    oExcel.Quit
    set oSheet = Nothing
    Set oExcel = Nothing

    --

    Regards,

    Dave Patrick ....Please no email replies - reply in newsgroup.
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    http://www.microsoft.com/protect

    "lumpjaw" wrote:
    | Greetings all!
    |
    | I have a project I am working on that I need help with, I am not sure how
    to
    | go about explaining it so I will just provide a scenario and hope someone
    | knows what I am talking about.
    |
    | I work in an environment where I create the same files over and over with
    | new directiories. Here is what I want to do.
    |
    | I create folders that have a unique name, let's say 'job number'
    | I have three subfolders (not unique)
    | I have an excel file which contains information in the file 'job number',
    | the file name itself is also includeing the job number.
    | I have a word file that is similar to the excel file.
    |
    | I want to create a script that will create the folder with job name, the
    sub
    | folders, excel & word documents with the file name including the job
    number
    | and also information in the file (let's say to a text field).
    |
    | Is there any good way to do this? Thanks for the help.
    |
    | --
    |
    | Please post your responses to this newsgroup so that
    | we may all learn from your expertise.
    |
    | -lumpjaw
    |
    |



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1