|
-
Oct 6th, 2007, 01:32 PM
#1
Thread Starter
New Member
Open an Excel File and Run a Macro Q
I am not literate in VB but have being looking on the web to try and
automate a process. What I wish to do is
1) Open MS Outllook (if it is not already open)
2) Open an Excel file
3) Run a Maco within this file)
4) Save the opened Excel file and close it
5) Leave MS Outlook & Excel applications opened
From my look I have found the following and adapted it (saved as *.vbs), but it doesn't fully work. Could anyone assist me in achieving
1-5 above?
Thanks
Dim objXL
Set objXL = CreateObject("Excel.Application")
on error resume next
With objXL
.Workbooks.Open ("F:\User\My Documents\Reports\Daily Sales.xls")
.Run "Daily Sales.xls!copy_paste"
.Quit
End With
Set objXL = Nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|