Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit the Existing mail #799

Closed
SindhuChenna opened this issue Jun 17, 2024 · 8 comments
Closed

Edit the Existing mail #799

SindhuChenna opened this issue Jun 17, 2024 · 8 comments

Comments

@SindhuChenna
Copy link

https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/hello-world/outlook-hello-world

Describe the bug

On click of button getting error
Uncaught TypeError: Office.context.mailbox.item.body.setAsync is not a function
at HTMLButtonElement.sayHello

To Reproduce

Steps to reproduce the behavior:

  1. _Go to add-in
  2. _Click on sayHello button
  3. Scroll down to '....'
  4. See error Uncaught TypeError: Office.context.mailbox.item.body.setAsync is not a function
    at HTMLButtonElement.sayHello

Expected behavior

Display the required message in the email body

Screenshots

Screenshot 2024-06-17 181940

Environment

  • Platform [PC desktop, Mac, iOS, Office Online]: ______
  • Host [Excel, Word, PowerPoint, etc.]: ______
  • Office version number: ______
  • Operating System: ______
  • Browser (if using Office Online): ______

Additional context

Add any other context about the problem here.

@AlexJerabek
Copy link
Collaborator

Hi @SindhuChenna,

Thanks for reporting this. Could you please share which version of Outlook you're using (web, Mac, Windows Classic, New Outlook for Windows)? Also, just to clarify, are you using the GitHub hosted version (manifest.xml), or are you running the web server on localhost (manifest-localhost.xml?

@SindhuChenna
Copy link
Author

Hi,
New outlook for windows.
I have just copied manifest.xml and html files.

@AlexJerabek
Copy link
Collaborator

AlexJerabek commented Jun 17, 2024

Thank you for the reply. When you say you've "copied manifest,xml and html files", could you please elaborate? If you're building the project and running it locally, you'll need to copy everything from the repo. If you're sideloading the GitHub hosted version, you should only need the manifest.

Also, I reran the sample and could not reproduce those errors.

@SindhuChenna
Copy link
Author

After adding localhost.crt and localhost.key files in the folder getting the below error
Error: Could not find certificate localhost.crt
Screenshot (191)

@AlexJerabek
Copy link
Collaborator

@exextoc, could you please take a look?

@davidchesnut
Copy link
Member

Hi @SindhuChenna, to run the sample from localhost, you need to put the localhost.key and .crt files in the Office-Add-in-samples\Samples\hello-world\outlook-hello-world folder. Then you can run http-server -S -C localhost.crt -K localhost.key --cors . -p 3000 from that same folder. Hope this helps!

Copy link
Contributor

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

Copy link
Contributor

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants