Solved

DDE between WORD6 and AutoManagerWorkflow

Posted on 1998-08-11
2
351 Views
Last Modified: 2008-02-01
Hello,

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.
0
Comment
Question by:y_goulet
2 Comments
 
LVL 1

Accepted Solution

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

Author Comment

by:y_goulet
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.



0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

761 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