| | Awarded by Microsoft since 2005: |  |
| | VBOffice Info | | Visitors | 1409110 | | Impressions | 5189234 |
| |
|
| |
| Author: Michael Bauer | Homepage | | Date: 13.10.2010 | Accessed: 7751 | | | | Description
Do you frequently want to look at a certain file, an Excel workbbok for instance? This example demonstrates how to open the file via VBA from within Outlook.
You just need to adjust the value of the 'File' variable to point to the Excel workbook. |
Public Sub OpenMyExcelFile()
Dim File$
Dim Xl As Object
Dim Wb As Object
Dim Ws As Object
File = "c:\file.xls"
On Error Resume Next
Set Xl = GetObject(, "excel.application")
On Error GoTo 0
If Xl Is Nothing Then Set Xl = New Excel.Application
Set Wb = Xl.Workbooks.Open(File)
Set Ws = Wb.Sheets(1)
Ws.Activate
Ws.Range("a1").Activate
Xl.Visible = True
End Sub
|
| | |
| | |  | ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the ... [more] |
| | |  | Access the master category list in the blink of an eye, share your categories in a network, get a reminder service, and ... [more] |
| | |  | SAM automatically sets the sender, signature, and folder for sent items, for instance based on the recipient ... [more] |
| | |  | OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or ... [more] |
| |
|