![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: OLE DOORS ->Word Topic Summary: Problems executing VBA Macro by DOORS OLE Created On: 15-Aug-2006 15:49 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi DOORS programmers
![]() I want to start a VBA macro implemented in a word-DOT using the 'oleMethod' command. The following syntax: clear(objArgBlock) put(objArgBlock, "C:\\template.dot!ThisDocument.FormatHeader") string s s = oleMethod(objDoc, "Application.Run", objArgBlock) print s generates the error "Problem with OLE Argument names". This message is not really detailed ![]() Does anybody have any idea? Regards Darius Dolnik |
|
![]() |
|
![]() |
|
-
Edited: 15-Aug-2006 at 21:07 by ron lewis |
|
![]() |
|
![]() |
|
Darius,
The following should help, I haven't checked it so ther might be slight syntax issues. ------------------------- Regards, Richard Good |
|
![]() |
|
![]() |
|
Hi Richard,
thanks for your answer. The hint was to use 'objWord' instead of 'objDoc' as 'oleMethod' parameter. Now the code runs well ![]() To give you some details please take a look at these few lines below clear(objArgBlock) put(objArgBlock, "C:\\template.dot!FormatHeader") oleMethod(objWord, "Run", objArgBlock) Take care Darius Dolnik |
|
![]() |
|
![]() |
|
The DXL programming is a little bit tricky. To run a WORD macro using oleMethod succeeded but now I want to call the macro and put a parameter to it.
In VBA the following header exists: Sub FormatHeader(ByVal sAuthor As String) .... End Sub In DXL the code looks like: ... clear(objArgBlock) sCurrentString = "C:\\template.dot!FormatHeader" put(objArgBlock, sCurrentString) sCurrentString = "Darius" put(objArgBlock, sCurrentString) sCurrentString = oleMethod(objWord, "Run", objArgBlock) print sCurrentString ... oleMethod returns the error "OLE problem:" ![]() I tried a lot of possibilities to put the parameter to objArgBlock (macro name & parameter in one 'put' call, parameter first and macro name after it in two 'put' calls and so on) and I also used the DXL debugger but no one works. What is wrong with this code? Regards Darius Dolnik |
|
![]() |
|
![]() |
|
Darius,
I had exactly the same problem ![]() ------------------------- Regards, Richard Good Edited: 18-Aug-2006 at 16:56 by Richard Good |
|
![]() |
|
![]() |
|
Hi Richard,
I am really impressed ![]() ![]() ![]() Take care Darius |
|
![]() |
|
![]() |
|
I think the trick is to write the code in VBA first, (well if you can't figure it out fairly quickly) debug it then translate it to DXL. I agree that the DXL manual could be better, but on the other hand it allows self taught consultants like me to keep ahead of the hordes who don't know or don't want to know how to debug things without watch windows and break points etc. It's all a little bit primitive in DXL land but it has lots of good points.
------------------------- Regards, Richard Good |
|
![]() |
|
![]() |
|
You are right. DXL is a really simple language and the potentials it offers are very basic for somebody who comes from the windows world. I think it could be a challenge to implement a game like CALL OF DUTY or FEAR in DXL only
![]() By the way, what kind of structure is the OleAutoArgs type? Is it a dynamic array, a container, a record? Regards Darius Dolnik |
|
![]() |
|
![]() |
|
Darius,
I think you're right!! but there are some dxl games around, why not join Mr Goodman on the dark side by checking out this link ![]() ------------------------- Regards, Richard Good |
|
![]() |
Telelogic DOORS
» General Discussion
»
OLE DOORS ->Word
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.