Bonjour,

Bon, aucune info sur la macro enregistrée.

J'ai trouvé un prog C++, il faut maintenant le convertir en BASIC :

/** This method demonstrates how to insert indexes and index marks  */
protected void IndexExample () {
  try     {         // Go to the end of the document
xDocCursor.gotoEnd( false ); // Insert a new paragraph and position the cursor in it
    mxDocText.insertControlCharacter ( mxDocCursor,
      ControlCharacter.PARAGRAPH_BREAK, false );

    XParagraphCursor  xParaCursor = (XParagraphCursor)
      UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
    xParaCursor.gotoPreviousParagraph ( false );

    // Create a new ContentIndexMark and get it's XPropertySet interface
    XPropertySet xEntry = (XPropertySet)
      UnoRuntime.queryInterface( XPropertySet.class,
mxDocFactory.createInstance ( "com.sun.star.text.ContentIndexMark" ) );

    // Set the text to be displayed in the index
xEntry.setPropertyValue ( "AlternativeText", "Big dogs! Falling on my head!" );

    // The Level property _must_ be set
    xEntry.setPropertyValue ( "Level", new Short ( (short) 1 ) );

    // Create a ContentIndex and access it's XPropertySet interface
    XPropertySet xIndex = (XPropertySet)
      UnoRuntime.queryInterface( XPropertySet.class,
        mxDocFactory.createInstance ( "com.sun.star.text.ContentIndex" ) );

    // Again, the Level property _must_ be set
    xIndex.setPropertyValue( "Level", new Short ( (short) 10 ) );

// Access the XTextContent interfaces of both the Index and the IndexMark
    XTextContent xIndexContent = (XTextContent)
      UnoRuntime.queryInterface( XTextContent.class, xIndex );

    XTextContent xEntryContent =(XTextContent)
      UnoRuntime.queryInterface( XTextContent.class, xEntry );

    // Insert both in the document
mxDocText.insertTextContent( mxDocCursor, xEntryContent, false );
    mxDocText.insertTextContent( mxDocCursor, xIndexContent, false );

    // Get the XDocumentIndex interface of the Index
    XDocumentIndex xDocIndex = (XDocumentIndex)
    UnoRuntime.queryInterface( XDocumentIndex.class, xIndex );

    // And call it's update method
    xDocIndex.update();
  }     catch (Exception e)      {
    e.printStackTrace ( System.out );
  }
}


Le 03/02/2018 à 15:34, Stéphane Santon a écrit :
Bonjour,

Pour écrire une macro, où trouver les paramètres de .uno:InsertIndexesEntry ?

Quand j'enregistre en macro la commande Insertion | Entrée d'index, la ligne est sans paramètres et commentée.

Merci



--
Envoyez un mail à users+unsubscr...@fr.libreoffice.org pour vous désinscrire
Les archives de la liste sont disponibles à 
https://listarchives.libreoffice.org/fr/users/
Tous les messages envoyés sur cette liste seront archivés publiquement et ne 
pourront pas être supprimés

Répondre à