Solved

DDE between WORD6 and AutoManagerWorkflow

Posted on 1998-08-11
2
334 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
Comment Utility
replace all wordbasic. with nothing, [] with nothing and perhaps at DDETerminate channel must be enclosed. good luck.
0
 

Author Comment

by:y_goulet
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
This article will show you how to use shortcut menus in the Access run-time environment.
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 viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

772 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

15 Experts available now in Live!

Get 1:1 Help Now