Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,microsoft.public.office,microsoft.public.word.general
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
word <- Excel automation - Too many named ranges? | Excel Programming | |||
Data Automation from Excel to Word | Excel Discussion (Misc queries) | |||
Excel and Word automation | Excel Programming | |||
office automation Word-Excel | Excel Programming |