busybee
04-18-2001, 01:00 AM
Can anyone tell me the code I need to write to open an Excel file from Outlook Contact form and go to a particular sheet.
I made a custom form which has a text and Command button control. I have the Excel sheet number in the text control and when I click the button control, it should open Excel and go to that particular sheet mentioned in the text control.
I am unable to start excel application and open the file.
What I am doing now is Opening the file through Internet Explorer but it is too slow. The code I wrote is as follows :
Sub cmdFileOpen_Click()
Set MyApp = Item.Application
Set AcctSheet = MyApp.CreateObject("InternetExplorer.Application")
AcctSheet.Visible = TRUE
AcctSheet.Navigate "C:\My Documents\AccountSheet.xls"
End Sub
This is too slow and it will not do what I need. I want this to work on a network with Outlook NetFolders.
I made a custom form which has a text and Command button control. I have the Excel sheet number in the text control and when I click the button control, it should open Excel and go to that particular sheet mentioned in the text control.
I am unable to start excel application and open the file.
What I am doing now is Opening the file through Internet Explorer but it is too slow. The code I wrote is as follows :
Sub cmdFileOpen_Click()
Set MyApp = Item.Application
Set AcctSheet = MyApp.CreateObject("InternetExplorer.Application")
AcctSheet.Visible = TRUE
AcctSheet.Navigate "C:\My Documents\AccountSheet.xls"
End Sub
This is too slow and it will not do what I need. I want this to work on a network with Outlook NetFolders.