Hi guys:
I work on a call center and everyday I aswer about 20 call with the exact requirements, so I thought about making a macro to speed things up. The procedure is this, normally I copy some text from a web page and paste it on a text document, I read the text to the client and write down the answer (I.E: Phone line active?, yes).
I was reading Andrew Pitonyak’s OpenOffice.org Macros Explained (OOME) and on page 606 he explains how to invoke a dialog from a macro. I don't know what I'm doing wrong but everytime I try to run the macro to invoke the dialog I got "BASIC runtime error.An exception occurredType: com.sun.star.container.NoSuchElementExceptionMessage: ." pointing to line 15 "DialogLibraries.loadLibrary("Template")"
What I'm trying to do is this, a macro to invoke a dialog with 3 buttons (Enable Services, Disable Services, Call Retrieval). When I push a button I call another dialog with buttons that represent all the questions a ask the clients (I.E, when I push "Enable Services" I invoke a dialog with all the questions related to the process to enable aditional services "Phone line is active?", "What is your OS?", "Do you have an AV installed?").
The use case is this, a call is answered, I take the personal data and then I execute the macro, the macro call the dialog, in the dialog I click button "Enable Services" and it bring the second dialog, when I click the buttons "Phone line is active?", "What is your OS?", "Do you have an AV installed?" the macro should end and I should have writed down on the document the questions "Phone line is active?", "What is your OS?", "Do you have an AV installed?"
I already design the dialogs, but I can't invoke the first dialog from the macro, or the following dialogs after clicking the buttons, and I don't have any text written down on my document...
Any help on this is highly appreciated.
Hi Angel,
Hi guys: I work on a call center and everyday I aswer about 20 call
with the exact requirements, so I thought about making a macro to
speed things up. The procedure is this, normally I copy some text
from a web page and paste it on a text document, I read the text to
the client and write down the answer (I.E: Phone line active?, yes).
I was reading Andrew Pitonyak’s OpenOffice.org Macros Explained
(OOME) and on page 606 he explains how to invoke a dialog from a
macro. I don't know what I'm doing wrong but everytime I try to run
the macro to invoke the dialog I got "BASIC runtime error.An
exception occurredType:
com.sun.star.container.NoSuchElementExceptionMessage: ." pointing to
line 15 "DialogLibraries.loadLibrary("Template")"
There simply is no library "Template" in the library container where the macro resides. Either the macro is called from the MyMacro global container or the macro is called from a document's container. Did you see Andrew's remark on GlobalScope.DialogLibraries? Did you take care of correct upper or lower case?
What I'm trying to
do is this, a macro to invoke a dialog with 3 buttons (Enable
Services, Disable Services, Call Retrieval). When I push a button I
call another dialog with buttons that represent all the questions a
ask the clients (I.E, when I push "Enable Services" I invoke a dialog
with all the questions related to the process to enable aditional
services "Phone line is active?", "What is your OS?", "Do you have an
AV installed?"). The use case is this, a call is answered, I take the
personal data and then I execute the macro, the macro call the
dialog, in the dialog I click button "Enable Services" and it bring
the second dialog, when I click the buttons "Phone line is active?",
"What is your OS?", "Do you have an AV installed?" the macro should
end and I should have writed down on the document the questions
"Phone line is active?", "What is your OS?", "Do you have an AV
installed?" I already design the dialogs, but I can't invoke the
first dialog from the macro, or the following dialogs after clicking
the buttons, and I don't have any text written down on my
document... Any help on this is highly appreciated.
I'm sorry, but I can't see the benefit of a macro, where a set of template documents would do better and faster.
Volker
Hi Volker:
Thank you for answering. I solve the problem after reading and re reading your answer at least a hundred times. My bad was assuming that "OOME_30" was actually the name of the file containing the library instead of assuming that was the name of the library, using "Standard" instead of "Template" fix the problem.
Surely a couple of templates are the best option, but the use of such templates are forbidden
Hi Angel,
Hi guys: I work on a call center and everyday I aswer about 20 call
with the exact requirements, so I thought about making a macro to
speed things up. The procedure is this, normally I copy some text
from a web page and paste it on a text document, I read the text to
the client and write down the answer (I.E: Phone line active?, yes).
I was reading Andrew Pitonyak’s OpenOffice.org Macros Explained
(OOME) and on page 606 he explains how to invoke a dialog from a
macro. I don't know what I'm doing wrong but everytime I try to run
the macro to invoke the dialog I got "BASIC runtime error.An
exception occurredType:
com.sun.star.container.NoSuchElementExceptionMessage: ." pointing to
line 15 "DialogLibraries.loadLibrary("Template")"
There simply is no library "Template" in the library container where the
macro resides. Either the macro is called from the MyMacro global
container or the macro is called from a document's container. Did you
see Andrew's remark on GlobalScope.DialogLibraries? Did you take care of
correct upper or lower case?
What I'm trying to
do is this, a macro to invoke a dialog with 3 buttons (Enable
Services, Disable Services, Call Retrieval). When I push a button I
call another dialog with buttons that represent all the questions a
ask the clients (I.E, when I push "Enable Services" I invoke a dialog
with all the questions related to the process to enable aditional
services "Phone line is active?", "What is your OS?", "Do you have an
AV installed?"). The use case is this, a call is answered, I take the
personal data and then I execute the macro, the macro call the
dialog, in the dialog I click button "Enable Services" and it bring
the second dialog, when I click the buttons "Phone line is active?",
"What is your OS?", "Do you have an AV installed?" the macro should
end and I should have writed down on the document the questions
"Phone line is active?", "What is your OS?", "Do you have an AV
installed?" I already design the dialogs, but I can't invoke the
first dialog from the macro, or the following dialogs after clicking
the buttons, and I don't have any text written down on my
document... Any help on this is highly appreciated.
I'm sorry, but I can't see the benefit of a macro, where a set of
template documents would do better and faster.
Volker
Hi Angel,
Hi Volker: Thank you for answering. I solve the problem after
reading and re reading your answer at least a hundred times. My bad
was assuming that "OOME_30" was actually the name of the file
containing the library instead of assuming that was the name of the
library, using "Standard" instead of "Template" fix the problem.Surely a couple of templates are the best option, but the use of such
templates are forbidden
OK, then there are two more suggestions. First: have you thought of Autotext entries?
Second: Maybe it is easier to have all your choice of questions in *one* dialog, in a set of list boxes. You can have multiple choice there. If each of the boxes gets a separate control button, you won't be compelled to switch between different dialogs. You have only one and that one stays open as long as you wish.
You can content with a short form of the questions in a list box. Its model has the property SelectedItems (also returned by the list box's method GetSelectedItemsPos()) that gives you an array of the indexes of the multiple selection. You can then use these indexes to an array of the long form of the questions.
Good luck with experimenting.
Volker