Solved

DDE between WORD6 and AutoManagerWorkflow

Posted on 1998-08-11
2
337 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
In case Office 2010 has not been deployed in your environment, this article may be quite useful. In our office, we wanted a way to deploy Microsoft Office Professional Plus 2010 through an automated batch file via logon script. This article is docum…
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.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

896 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now