Das Notes Forum

Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: Markus_W am 25.04.02 - 17:55:21

Titel: Anhang autom. starten
Beitrag von: Markus_W am 25.04.02 - 17:55:21
Hab da mal wieder ein Problem

Ich schreib gerade eine Anwendung, ein Ablagesystem für Exceltabellen....
Wenn der User in einer Ansicht auf 1Dokument klickt soll sofort der Excel-Anhang im Dok gestartet werden.
Hab in den Maskeneigenschaften _ersten Anhang starten- ausgewählt.
Nun mein Problem: Es wird zwar die Excel-Tabelle gestartet, er wechselt aber sofort wieder in Notes. Das geht so schnell das es die meisten User gar nicht mitbekommen, dass da sich auch excel (97) gestartet hat....

Ich hab keine Ahnung warum dem so ist   :'(, kann mir da jemand helfen?
Titel: Re: Anhang autom. starten
Beitrag von: christoph_berger am 26.04.02 - 12:51:26
Hallo Markus

Das ist sch#!$$e, ehh. Ich habe das selbe Problem mit PDF. Was hinhaut (im Falle von Word) ist, dass du ein Objekt erstellst --> Create\Object\Object from a file und dann die Datei auswählen. In der Form musst du natürlich die Launch Option umstellen auf OLE.

Ich habe in meiner DB ein Script eingebaut, dass das Attachment detacht und automatisch ein OLE daraus generiert.

Gruss
Christoph
Titel: Re: Anhang autom. starten
Beitrag von: eknori am 26.04.02 - 14:03:38
Hab das hier aus der Knowledge Base:

Autolaunch Attachment Launches Attachment but the Window Does Not Maintain Focus

Problem:

When you open a Notes document, you see an attachment launched in a window, but then that window is sent to the background.  This problem also occurs if the attachment is done at the form level and is reproducible using MS Word 97 files, MS Excel files, as well as Adobe Acrobat files.

Solution:

This issue has been reported to Lotus Quality Engineering.

The issue was not observed with Acrobat 3.0.

Workaround:

It is possible to work around this issue by writing a formula that will launch an attachment in a field.  However, this workaround will only be applicable if the document can be put into Edit mode.  The example below demonstrates how to use @Commands to launch the attachment in a Rich Text field called "Body":

@Command([EditDocument];"1");
@Command([EditGotoField];"Body");
@Command([EditSelectAll]);
@Command([AttachmentLaunch])

NOTE:  The autolaunch setting is in the Form Properties Launch tab (third tab with rocket icon).