Hi,
I raised this problem here before but had no responses. That thread is now closed but I still have the error, so thought I'd try posting it again, to see if anyone has any suggestions what we can do.
---
We have a CRM system, one function of which is to generate custom letters in Word using macros (they bring customer details from a SQL database into templates). Am just setting up PCs with Office 2010 for the first time and found the macros we have for Word 2007 don't work in Word 2010. The dialog box error is "this file could not be found". The portion of the macro brought up in the debugger is below, with the highlighted line it chokes at below.
I've read that Word 2010 is fully compatible with 2007, but wondered if that doesn't apply to Macros? Any clues what may be the cause? This is happening on Windows 7 PCs, but we have other Windows 7 PCs with Office 2007 and the problem doesn't occur with them, so it looks to be something different in how Word 2010 macros work.
Yes, I have raised it with the CRM supplier, but it may take some time for us to achieve support from them and I really need to resolve this within the next couple of days. Thanks in advance for any suggestions.
---
Private Sub NewForm()
Dim fn$
Dim pn$
Dim Title$
' On Error Goto Trap
Dim FileInfo As Object: Set FileInfo = WordBasic.DialogRecord.FileSummaryInfo(False)
WordBasic.CurValues.FileSummaryInfo FileInfo
' dot$ = FileInfo.Template
fn$ = FileInfo.FileName
pn$ = FileInfo.Directory
Title$ = FileInfo.Title
Dot$ = pn$ + "\" + fn$
WordBasic.DocClose 2
WordBasic.FileNew Template:=Dot$, NewTemplate:=0
If Title$ = "" Then Title$ = "New Merge Document"
WordBasic.FileSummaryInfo Title:=Title$
'Setting title sets DocumentDirty to true
WordBasic.SetDocumentDirty 0
bye:
End Sub
---
It highlights this line in the debug window...
WordBasic.FileNew Template:=Dot$, NewTemplate:=0
I raised this problem here before but had no responses. That thread is now closed but I still have the error, so thought I'd try posting it again, to see if anyone has any suggestions what we can do.
---
We have a CRM system, one function of which is to generate custom letters in Word using macros (they bring customer details from a SQL database into templates). Am just setting up PCs with Office 2010 for the first time and found the macros we have for Word 2007 don't work in Word 2010. The dialog box error is "this file could not be found". The portion of the macro brought up in the debugger is below, with the highlighted line it chokes at below.
I've read that Word 2010 is fully compatible with 2007, but wondered if that doesn't apply to Macros? Any clues what may be the cause? This is happening on Windows 7 PCs, but we have other Windows 7 PCs with Office 2007 and the problem doesn't occur with them, so it looks to be something different in how Word 2010 macros work.
Yes, I have raised it with the CRM supplier, but it may take some time for us to achieve support from them and I really need to resolve this within the next couple of days. Thanks in advance for any suggestions.
---
Private Sub NewForm()
Dim fn$
Dim pn$
Dim Title$
' On Error Goto Trap
Dim FileInfo As Object: Set FileInfo = WordBasic.DialogRecord.FileSummaryInfo(False)
WordBasic.CurValues.FileSummaryInfo FileInfo
' dot$ = FileInfo.Template
fn$ = FileInfo.FileName
pn$ = FileInfo.Directory
Title$ = FileInfo.Title
Dot$ = pn$ + "\" + fn$
WordBasic.DocClose 2
WordBasic.FileNew Template:=Dot$, NewTemplate:=0
If Title$ = "" Then Title$ = "New Merge Document"
WordBasic.FileSummaryInfo Title:=Title$
'Setting title sets DocumentDirty to true
WordBasic.SetDocumentDirty 0
bye:
End Sub
---
It highlights this line in the debug window...
WordBasic.FileNew Template:=Dot$, NewTemplate:=0