Hello. I want to write something that will open a MSWord file then run a MSWord macro on that file of some name. I was able to find a decent example of a DDE code in Access's help but it does not work. I get an "Overflow" error. Any way following is what I attempted to use:
Dim intI As Integer, intChan1 As Integer
Dim strTopics As String, strResp As String, strSheetName As String
On Error Resume Next
intChan1 = DDEInitiate("winword", "System"
'**Error here**
If Err Then
Err = 0
Shell "Excel", 1
If Err Then Exit Sub
intChan1 = DDEInitiate("winword", "System"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
End If
DDEExecute intChan1, "Application.run macroname:=""macro1""" '**not sure if this is correct
**verbage to run a macro**
DDETerminateAll
Dim intI As Integer, intChan1 As Integer
Dim strTopics As String, strResp As String, strSheetName As String
On Error Resume Next
intChan1 = DDEInitiate("winword", "System"
If Err Then
Err = 0
Shell "Excel", 1
If Err Then Exit Sub
intChan1 = DDEInitiate("winword", "System"
End If
DDEExecute intChan1, "Application.run macroname:=""macro1""" '**not sure if this is correct
**verbage to run a macro**
DDETerminateAll