Hi,
how can i modify the code below in Outlook that when file opens in Excel is in maximize window.
how can i modify the code below in Outlook that when file opens in Excel is in maximize window.
Code:
Public Sub OpenVendorChartofAcounts() Dim xExcelFile As String
Dim xExcelApp As Excel.Application
Dim xWb As Excel.Workbook
Dim xWs As Excel.Worksheet
Dim xExcelRange As Excel.Range
xExcelFile = "\\mtlnas01\share\Accountant Files\AP Team\Jose\NCL_XLSM\CHART OF ACCOUNTS.xlsm"
Set xExcelApp = CreateObject("Excel.Application")
Set xWb = xExcelApp.Workbooks.Open(xExcelFile)
Set xWs = xWb.Sheets(1)
xWs.Activate
Set xExcelRange = xWs.Range("A1")
xExcelRange.Activate
xExcelApp.Visible = True
End Sub