BigDelGooner
Board Regular
- Joined
- Aug 17, 2009
- Messages
- 197
Hi all
I was using the following code within an AddIn that I created which was working fine with office 2003..
Sub Open_FundNoteTemplate()
Set Wordapp = CreateObject("word.Application")
Wordapp.documents.Open "\\lon0306.london.schroders.com\dfs\data\dta\SIM_SPF\Investment\Investment Selection\Fund Research & Documentation\__FUND NOTE TEMPLATES\YYYY-MM-DD Fund Note - Fund_Name.doc"
Wordapp.Visible = True
End Sub
...however since switching to Office 2010 I get a '4198' run-time error with the message 'Command failed'. Interesting when I step through the code in VBA it works fine, it's just when the code is executed from the dropdown menu that I get this error.
Any suggestions?
I was using the following code within an AddIn that I created which was working fine with office 2003..
Sub Open_FundNoteTemplate()
Set Wordapp = CreateObject("word.Application")
Wordapp.documents.Open "\\lon0306.london.schroders.com\dfs\data\dta\SIM_SPF\Investment\Investment Selection\Fund Research & Documentation\__FUND NOTE TEMPLATES\YYYY-MM-DD Fund Note - Fund_Name.doc"
Wordapp.Visible = True
End Sub
...however since switching to Office 2010 I get a '4198' run-time error with the message 'Command failed'. Interesting when I step through the code in VBA it works fine, it's just when the code is executed from the dropdown menu that I get this error.
Any suggestions?