Hi,
I just converted an Access database from 2.0 to 97, There is a problem I don't know how to
solve, need somebody help me. I have a function like this:
Function MergeModifyWord(FileName As String, ClaimNumber As String, LetterCode As
String)
On Error GoTo MergeModifyWord_Err
Dim Channel As Variant, Q As String, MergeCmd2 As String Dim MergeCmd As String
Dim Retval As Variant, MergeCmd3 As String
FileName = UCase$(FileName)
Q = Chr$(34)
MergeCmd = "[FileClose 2]"
MergeCmd2 = "[FilePrintMergeToDoc]"
MergeCmd3 = "[Activate """ & FileName & """]"
DDETerminateAll
Channel = DDEInitiate("WINWORD", "System"
DDEExecute Channel, MergeCmd2
DDEExecute Channel, MergeCmd3
DDEExecute Channel, MergeCmd
DDETerminate Channel
Retval = SaveLetter(LetterCode, ClaimNumber)
MergeModifyWord = True
MergeModifyWord_Exit:
Exit Function
MergeModifyWord_Err:
MsgBox "Error: " + Error$, 0, "MergeModifyWord"
Resume MergeModifyWord_Exit
End Function
When the code run to "DDEExecute Channel, MergeCmd2", it will appare a message said,
Ambiguous name detected: TmpDDE. I was told, If I deleted the TmpDDE Macro from
Microsoft Word' Tools->Macro->Macros or renamed the Normal.dot file,it would work fine. I
did these, but there is another problem appear, when I run the code from Access, and when it run
to "DDEExecute Channel, MergeCmd2", the Visual Basic Editor come out with a Sub like this
Sub TmpDDE()
Dim FilePrintMergeToDoc
FilePrintMergeToDoc
End Sub
The "FilePrintMergrToDoc" Highlighted, and also have a message said: Compile error:
Expected Sub, Function or property. I spent one week already to try to solve this problem, but
got nothing. Somebody please please please help me.
Thanks in advance.
I just converted an Access database from 2.0 to 97, There is a problem I don't know how to
solve, need somebody help me. I have a function like this:
Function MergeModifyWord(FileName As String, ClaimNumber As String, LetterCode As
String)
On Error GoTo MergeModifyWord_Err
Dim Channel As Variant, Q As String, MergeCmd2 As String Dim MergeCmd As String
Dim Retval As Variant, MergeCmd3 As String
FileName = UCase$(FileName)
Q = Chr$(34)
MergeCmd = "[FileClose 2]"
MergeCmd2 = "[FilePrintMergeToDoc]"
MergeCmd3 = "[Activate """ & FileName & """]"
DDETerminateAll
Channel = DDEInitiate("WINWORD", "System"
DDEExecute Channel, MergeCmd2
DDEExecute Channel, MergeCmd3
DDEExecute Channel, MergeCmd
DDETerminate Channel
Retval = SaveLetter(LetterCode, ClaimNumber)
MergeModifyWord = True
MergeModifyWord_Exit:
Exit Function
MergeModifyWord_Err:
MsgBox "Error: " + Error$, 0, "MergeModifyWord"
Resume MergeModifyWord_Exit
End Function
When the code run to "DDEExecute Channel, MergeCmd2", it will appare a message said,
Ambiguous name detected: TmpDDE. I was told, If I deleted the TmpDDE Macro from
Microsoft Word' Tools->Macro->Macros or renamed the Normal.dot file,it would work fine. I
did these, but there is another problem appear, when I run the code from Access, and when it run
to "DDEExecute Channel, MergeCmd2", the Visual Basic Editor come out with a Sub like this
Sub TmpDDE()
Dim FilePrintMergeToDoc
FilePrintMergeToDoc
End Sub
The "FilePrintMergrToDoc" Highlighted, and also have a message said: Compile error:
Expected Sub, Function or property. I spent one week already to try to solve this problem, but
got nothing. Somebody please please please help me.
Thanks in advance.