IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

C# Discussion :

Addin Powerpoint pour le web


Sujet :

C#

  1. #1
    Expert confirmé
    Avatar de popo
    Homme Profil pro
    Analyste programmeur Delphi / C#
    Inscrit en
    Mars 2005
    Messages
    2 721
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Analyste programmeur Delphi / C#
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2005
    Messages : 2 721
    Points : 5 366
    Points
    5 366
    Par défaut Addin Powerpoint pour le web
    Bonjour,

    Je suis en train de faire un POC pour créer un addin pour la version Online de Power point.
    J'ai suivi la documentation officielle de Microsoft.
    Celle-ci : https://learn.microsoft.com/en-us/of...s=visualstudio

    J'ai laissé le code HTML, JS et CSS par défaut et suis passé directement à la modification du manifeste.

    L'addin fonctionne parfaitement dans le client lourd installé sur ma machine.
    Mais sur la version en ligne, il ne se charge pas.

    En parcourant différents sites, j'ai vu qu'il fallait utiliser des URL en https pour passer la validation.
    J'ai donc placé un s derrière le HTTP mis par défaut et modifié le manifeste en conséquence.

    Désormais mon manifeste semble accepté mais l'addin ne se charge toujours pas.
    La commande office-addin-manifest validate PowerPointWebAddIn.xml me dit que mon manifeste est valide.

    Voici le détail de la vérification :
    Validation Information:
    Package Type Identified: Package of your add-in was parsed successfully.

    Correct Package: Your package matches the submission type.

    Valid Manifest Schema: Your manifest does adhere to the current set of XML schema definitions for Add-in manifests.

    Manifest Version Correct Structure: The manifest version number has the correct structure for the platform that it supports.

    Manifest Version Correct Value: The manifest version number is greater or equal to 1.0.

    Manifest ID Valid Prefix: The product ID in the manifest has a valid prefix
    - Details: a2002595-63c7-4a5f-8e69-01719e291613

    Manifest ID Correct Structure: The structure of the product ID is correct.
    - Details: a2002595-63c7-4a5f-8e69-01719e291613

    Desktop Source Location Present: A desktop or default source location URL is found.

    Secure Desktop Source Location: The manifest desktop source location URLs use HTTPS.

    The manifest source location URLs are valid.: The manifest source location URLs are valid.

    Supported Office Identified: Supported Office products were successfully determined.

    Support URL Present: The manifest support URL is present.
    - Details: https://contoso.com/support

    Valid Support URL structure: The manifest support URL has valid structure.

    Valid OnlineMeetingCommandSurface ExtensionPoint.: OnlineMeetingCommandSurface ExtensionPoint extracted from manifest is found to be valid.

    Icon Present: A icon element was expected and is present.
    - Details: https://localhost:52597/Images/Button32x32.png

    Supported Icon URL File Extension: The manifest icon URL has a valid image file extension.
    - Details: png

    The manifest icon URL uses HTTPS.: Secure Icon URL
    - Details: https://localhost:52597/Images/Button32x32.png

    All GetStarted strings are present in Resources: All GetStarted strings are present in Resources

    Acceptance Test Completed: Acceptance test service has finished checking provided add-in.


    Based on the requirements specified in your manifest, your add-in can run on the following platforms; your add-in will be tested on these platforms when you submit it to the Office Store:
    - PowerPoint on iPad
    - PowerPoint on Mac (Microsoft 365)
    - PowerPoint 2016 or later on Mac
    - PowerPoint 2019 or later on Mac
    - PowerPoint on the web
    - PowerPoint 2013 or later on Windows
    - PowerPoint 2016 or later on Windows
    - PowerPoint 2019 or later on Windows
    - PowerPoint on Windows (Microsoft 365)
    Important: This analysis is based on the requirements specified in your manifest and does not account for any runtime JavaScript calls within your add-in. For information about which API sets and features are supported on each platform, see Office Add-in host and platform availability. (https://docs.microsoft.com/office/de...n-availability).

    *This does not include mobile apps. You can opt-in to support mobile apps when you submit your add-in.

    The manifest is valid.
    Et le manifeste en question :
    Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
    <OfficeApp 
              xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" 
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
              xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" 
              xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
              xsi:type="TaskPaneApp">
     
      <!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
     
      <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
      <Id>a2002595-63c7-4a5f-8e69-01719e291613</Id>
     
      <!--Version. Updates from the store only get triggered if there is a version change. -->
      <Version>1.0.0.0</Version>
      <ProviderName>Popo</ProviderName>
      <DefaultLocale>fr-FR</DefaultLocale>
      <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
      <DisplayName DefaultValue="Powerpoint Web AddIn" />
      <Description DefaultValue="Powerpoint Web AddIn - POC"/>
      <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
      <IconUrl DefaultValue="https://localhost:52597/Images/Button32x32.png" />
     
      <SupportUrl DefaultValue="https://contoso.com/support" />
      <!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
      <AppDomains>
        <AppDomain>https://localhost:52597</AppDomain>
        <AppDomain>https://login.microsoftonline.com</AppDomain>
      </AppDomains>
      <!--End Basic Settings. -->
     
      <!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
      <Hosts>
        <Host Name="Presentation" />
      </Hosts>
      <DefaultSettings>
        <SourceLocation DefaultValue="https://localhost:52597/Home.html" />
      </DefaultSettings>
      <!-- End TaskPane Mode integration.  -->
     
      <Permissions>ReadWriteDocument</Permissions>
     
      <!-- Begin Add-in Commands Mode integration. -->
      <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
     
        <!-- The Hosts node is required. -->
        <Hosts>
          <!-- Each host can have a different set of commands. -->
          <!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
          <!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
          <Host xsi:type="Presentation">
            <!-- Form factor. Currently only DesktopFormFactor is supported. -->
            <DesktopFormFactor>
              <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
              <GetStarted>
                <!-- Title of the Getting Started callout. The resid attribute points to a ShortString resource -->
                <Title resid="Contoso.GetStarted.Title"/>
     
                <!-- Description of the Getting Started callout. resid points to a LongString resource -->
                <Description resid="Contoso.GetStarted.Description"/>
     
                <!-- Points to a URL resource which details how the add-in should be used. -->
                <LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl"/>
              </GetStarted>
              <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called. 
                Think of the FunctionFile as the code behind ExecuteFunction. -->
              <FunctionFile resid="Contoso.DesktopFunctionFile.Url" />
     
              <!-- PrimaryCommandSurface is the main Office Ribbon. -->
              <ExtensionPoint xsi:type="PrimaryCommandSurface">
                <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
                <OfficeTab id="TabHome">
                  <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
                  <Group id="Contoso.Group1">
                    <!-- Label for your group. resid must point to a ShortString resource. -->
                    <Label resid="Contoso.Group1Label" />
                    <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
                    <!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
                    <Icon>
                      <bt:Image size="16" resid="Contoso.tpicon_16x16" />
                      <bt:Image size="32" resid="Contoso.tpicon_32x32" />
                      <bt:Image size="80" resid="Contoso.tpicon_80x80" />
                    </Icon>
     
                    <!-- Control. It can be of type "Button" or "Menu". -->
                    <Control xsi:type="Button" id="Contoso.TaskpaneButton">
                      <Label resid="Contoso.TaskpaneButton.Label" />
                      <Supertip>
                        <!-- ToolTip title. resid must point to a ShortString resource. -->
                        <Title resid="Contoso.TaskpaneButton.Label" />
                        <!-- ToolTip description. resid must point to a LongString resource. -->
                        <Description resid="Contoso.TaskpaneButton.Tooltip" />
                      </Supertip>
                      <Icon>
                        <bt:Image size="16" resid="Contoso.tpicon_16x16" />
                        <bt:Image size="32" resid="Contoso.tpicon_32x32" />
                        <bt:Image size="80" resid="Contoso.tpicon_80x80" />
                      </Icon>
     
                      <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
                      <Action xsi:type="ShowTaskpane">
                        <TaskpaneId>ButtonId1</TaskpaneId>
                        <!-- Provide a URL resource id for the location that will be displayed on the task pane. -->
                        <SourceLocation resid="Contoso.Taskpane.Url" />
                      </Action>
                    </Control>
                  </Group>
                </OfficeTab>
              </ExtensionPoint>
            </DesktopFormFactor>
          </Host>
        </Hosts>
     
        <!-- You can use resources across hosts and form factors. -->
        <Resources>
          <bt:Images>
            <bt:Image id="Contoso.tpicon_16x16" DefaultValue="https://localhost:52597/Images/Button16x16.png" />
            <bt:Image id="Contoso.tpicon_32x32" DefaultValue="https://localhost:52597/Images/Button32x32.png" />
            <bt:Image id="Contoso.tpicon_80x80" DefaultValue="https://localhost:52597/Images/Button80x80.png" />
          </bt:Images>
          <bt:Urls>
            <bt:Url id="Contoso.DesktopFunctionFile.Url" DefaultValue="https://localhost:52597/Functions/FunctionFile.html" />
            <bt:Url id="Contoso.Taskpane.Url" DefaultValue="https://localhost:52597/Home.html" />
            <bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
          </bt:Urls>
          <!-- ShortStrings max characters==125. -->
          <bt:ShortStrings>
            <bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="Show Taskpane" />
            <bt:String id="Contoso.Group1Label" DefaultValue="Commands Group" />
            <bt:String id="Contoso.GetStarted.Title" DefaultValue="Get started with your sample add-in!" />
          </bt:ShortStrings>
          <!-- LongStrings max characters==250. -->
          <bt:LongStrings>
            <bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
            <bt:String id="Contoso.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." />
          </bt:LongStrings>
        </Resources>
      </VersionOverrides>
      <!-- End Add-in Commands Mode integration. -->
     
    </OfficeApp>

    Lorsque je charge mon addin, une autre icône apparait mais le bouton est bien présent.
    Mais lorsque je clique dessus pour l'activer le message suivant s'affiche :
    Désolé... Nous n’avons pas pu démarrer ce complément, car nous avons rencontré un problème. Merci de réessayer plus tard ou de contacter l’administrateur système.
    La console m'affichage ces messages :
    localhost:52597/Images/Button80x80.png:1 GET https://localhost:52597/Images/Button80x80.png net::ERR_CONNECTION_REFUSED
    Some icons were re-registered. Applications should only call registerIcons for any given icon once. Redefining what an icon is may have unintended consequences. Duplicates include: Undo_16, Delete_32, Textbox_32, CameoFeatureIcon_32, History_32, UxGalThemeStyles_32, TextBox_32, TableBorderColorSplitDropdown_16, LeftAlign_16, Centered_16 (+ 5 more)
    localhost:52597/Images/Button80x80.png:1 GET https://localhost:52597/Images/Button80x80.png net::ERR_CONNECTION_REFUSED
    officeExtensionMerge.js:18 Unrecognized feature: 'focus-without-user-activation'.
    VM10:5 crbug/1173575, non-JS module files deprecated.
    .

    Rien dans la page de Microsoft n'indique ce qu'il faut faire et la recherche des messages d'erreurs sur Google n'a donné aucun résultat en rapport avec un addin pour office.

    Une aide serait la bienvenue.
    Merci.

  2. #2
    Membre confirmé Avatar de licardentaistor
    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Juillet 2021
    Messages
    343
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Manche (Basse Normandie)

    Informations professionnelles :
    Activité : Administrateur de base de données

    Informations forums :
    Inscription : Juillet 2021
    Messages : 343
    Points : 493
    Points
    493
    Par défaut
    tu dessers tes images depuis un serveur local:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    Icon Present: A icon element was expected and is present.
    - Details: https://localhost:52597/Images/Button32x32.png
    et au vu du message ça ne fonctionne pas depuis l'extérieur.... ce qui me semble logique si tu n'as pas fait de redirections de port et / ou parefeu activé.

  3. #3
    Expert confirmé
    Avatar de popo
    Homme Profil pro
    Analyste programmeur Delphi / C#
    Inscrit en
    Mars 2005
    Messages
    2 721
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Analyste programmeur Delphi / C#
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2005
    Messages : 2 721
    Points : 5 366
    Points
    5 366
    Par défaut
    Cela n'a pas l'air de déranger Excel.
    J'ai ceci sur un autre Addin fait par un collègue parti à la retraite depuis et que je ne peux donc pas consulter.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <IconUrl DefaultValue="https://localhost:44395/Excel.OData/Images/Button32x32.png" />
    Mon pare-feu est bien activé.
    Et j'ignore comment on fait une redirection de port, donc il y a peu de chance que je l'eusse fait pour l'autre addin.

    Si ça peux aider, lorsque je tape https://localhost:52597/Images/Button32x32.png j'obtiens la même erreur.
    Si ça peux aider, lorsque je tape https://localhost:44395/Images/Button32x32.png cela fonctionne.

  4. #4
    Membre confirmé Avatar de licardentaistor
    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Juillet 2021
    Messages
    343
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Manche (Basse Normandie)

    Informations professionnelles :
    Activité : Administrateur de base de données

    Informations forums :
    Inscription : Juillet 2021
    Messages : 343
    Points : 493
    Points
    493
    Par défaut
    si ça marche sur un port et pas un autre peut être qu'il y a une règle de pare feu qui autorise 44395 ....

  5. #5
    Expert confirmé
    Avatar de popo
    Homme Profil pro
    Analyste programmeur Delphi / C#
    Inscrit en
    Mars 2005
    Messages
    2 721
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Analyste programmeur Delphi / C#
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2005
    Messages : 2 721
    Points : 5 366
    Points
    5 366
    Par défaut
    Non plus.
    J'ai exporté la liste présentée dans le pare-feu (entrant et sortant) et fait une recherche sur le port, cela n'a rien donnée.
    Aucune trace non plus dans le moniteur de ressources.

    Par contre, avec tout les projets Web que j'ai fait (simple site, applications web, api), c'est la première fois qu'il me génère un projet avec un numéro aussi élevé.
    D'habitude cela reste entre 1000 et 2000 pour HTTP et entre 43000 et 45000 pour HTTPS
    Dans le doute j'ai changé le port Http pour 1234 pour que VS me choisisse un autre port HTTPS à l'enregistrement.
    Il m'a généré un 44337.
    Et celui-là est accepté.

    J'ignore pourquoi cela ne passait pas avec l'autre numéro de port.
    Mais pour mon POC et le débogage, cela me convient.

    Je passe donc en résolu.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Votre langage de programmation serveur préféré pour le Web ?
    Par Marc Lussac dans le forum Général Conception Web
    Réponses: 82
    Dernier message: 18/02/2009, 17h50
  2. [Axis]installation du client Axis pour les Web Services
    Par LESOLEIL dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 31/08/2005, 14h45
  3. Réponses: 5
    Dernier message: 23/08/2005, 07h47
  4. [eclipse 3.0.1]plugins pour dvlp web HTML / CSS / PHP
    Par partyboy dans le forum Eclipse Java
    Réponses: 1
    Dernier message: 26/10/2004, 11h46
  5. Créer un graphique en GIF sous DELPHI pour du web
    Par Thom@s dans le forum Web & réseau
    Réponses: 20
    Dernier message: 08/07/2004, 15h40

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo