I'm using Microsoft Business Solutions C5 (C5), a danish ERP system. The MBS
people has written a DLL file, to handle merge from C5 to Word.
It works by a Template with Bookmarks. When the merge is triggered in C5,
the dll has functions to search and merge text into the bookmarks.
But I have no possibility to check if a bookmark is filled or not. I have
the typical adress "block" in my document. In C5 I have Name, Adress1,
Adress2, City. But when for instance Adress2 is empty, my adress "block"
will have a space in it.
So is there a way that I can call a macro after the dll merge is done? It's
no good to use the Autoopen or Autonew triggers, because of the dll merge is
triggered after these to triggers.
Mads W
Word Heretic - 14 Mar 2005 03:27 GMT
G'day "Mads W." <mw@[REMOVE]datasign.dk>,
To oversimplify, the current command to launch the dll stuff is
something like
Public Sub SomeDamnFunctionName()
MyDLLStart
End Sub
You need to replace this with your own (stored in normal or another
global template) that reads more like
Public Sub SomeDamnFunctionName()
MyDLLStart
DoMyCustomStuff
End Sub
Public Sub DoMyCustomStuff()
'blah blah
End sub
Steve Hudson - Word Heretic
steve from wordheretic.com (Email replies require payment)
Without prejudice
"Mads W." <mw@[REMOVE]datasign.dk> reckoned:
>I'm using Microsoft Business Solutions C5 (C5), a danish ERP system. The MBS
>people has written a DLL file, to handle merge from C5 to Word.
[quoted text clipped - 10 lines]
>
>Mads W
Mads W. - 14 Mar 2005 11:44 GMT
Thx for your answer Steve,
But I don't have the access to change either the DLL or the dll call from
the C5 program.
So I need my code to be written in the template, and I need it to be
automatically triggered when the DLL merge is finished, or when the bookmark
is filled.
Mads W.
> G'day "Mads W." <mw@[REMOVE]datasign.dk>,
>
[quoted text clipped - 41 lines]
>>
>>Mads W
Word Heretic - 15 Mar 2005 15:29 GMT
G'day "Mads W." <mw@[REMOVE]datasign.dk>,
Ensure the DLL is referenced from a VBA project and you can then use
the object explorer (f2) to search its public functions.
Steve Hudson - Word Heretic
steve from wordheretic.com (Email replies require payment)
Without prejudice
"Mads W." <mw@[REMOVE]datasign.dk> reckoned:
>Thx for your answer Steve,
>
[quoted text clipped - 51 lines]
>>>
>>>Mads W