DDE between WORD6 and AutoManagerWorkflow

Posted on 1998-08-11
Last Modified: 2008-02-01

I use AutoManager Worklow (AMW) (it is a document management software) to manage WORD6 documents.  I already created a LISP program to use DDE commands between AutoManager and WORD6.  It basically called a locked template with fields in it.  The fields are automatically updated in WORD6 from AutoManager database.   It works fine!
Now, I would like to have a macro in WORD6 that will use fields in WORD6 and update the fields in AutoManager.  
For example fields bookmark "TEXT1" in WORD6 connected to field in AMW called "Customer".
Here is a macro made under WORD97.  Unfortunately, I am not to familiar with the syntax in WORD6. Could anybody translate that macro to work properly in WORD6? Or supply me any program to translate macro from WORD97 to WORD6?
Attribute VB_Name = "DDEtest"

Public Sub MAIN()
Dim channel
Dim Id$
Dim Lock_$
Dim Blisp$

If WordBasic.AppIsRunning("AutoManager WorkFlow ") = 0 Then
    WordBasic.Shell "C:\AM\AMWWIN\AW32.EXE"
    WordBasic.AppActivate "Microsoft Word", 1
End If

channel = WordBasic.DDEInitiate("AMWDS", "newrec")
Id$ = WordBasic.[DDERequest$](channel, WordBasic.[FileName$]())
WordBasic.DDETerminate channel

channel = WordBasic.DDEInitiate("AMWDS", "exc_" + WordBasic.[LTrim$](Id$))
Lock_$ = WordBasic.[DDERequest$](channel, "lock;DDEtest")
WordBasic.DDETerminate channel

channel = WordBasic.DDEInitiate("AMWDS", "baselisp_" + WordBasic.[LTrim$](Id$))
Blisp$ = WordBasic.[DDERequest$](channel, "(putfield proj DDEtest)")
WordBasic.DDETerminate channel

channel = WordBasic.DDEInitiate("AMWDS", "exc_" + WordBasic.[LTrim$](Id$))
Lock_$ = WordBasic.[DDERequest$](channel, "unlock")
WordBasic.DDETerminate channel

WordBasic.Insert WordBasic.[FileName$]()
WordBasic.Insert Lock_$
WordBasic.Insert Blisp$

End Sub
When I used this macro as is in WORD6 it always give me syntax error at the line:
Id$ = WordBasic.[DDERequest$](channel, WordBasic.[FileName$]())

Thanks in advance for your answer. Don't hesitate to ask me any more info to clarify my question.
Question by:y_goulet
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

genius2 earned 100 total points
ID: 1613091
replace all wordbasic. with nothing, [] with nothing and perhaps at DDETerminate channel must be enclosed. good luck.

Author Comment

ID: 1613092
Thanks Genius2,

I removed the WordBasic. and the brackets and everything went smooth.  Now I will do my homework to improve the macro to suit my needs.


Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Outlook Free & Paid Tools
Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question