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

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Perhaps more familiar to developers who primarily use VBScript than to developers who tend to work only with Microsoft Office and Visual Basic for Applications (VBA), the Dictionary is a powerful and versatile class, and is useful …
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…

808 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