7coil / DiscordForOffice

Discord Rich Presence for Microsoft Office (2013 and above, Office 365)
https://leondrolio.com/projects/discordforoffice/
MIT License
162 stars 12 forks source link

Detect Word Document Close #14

Open JuanSlaterT opened 3 years ago

JuanSlaterT commented 3 years ago

Sometimes when i'm supposed to be working in word, in discord only appears this

image

Not sure why is happening, but just checked this when I was making my word document and I had back to check my discord game status

7coil commented 3 years ago

This is an intended feature. If you click off Microsoft Word, this "Not Active" screen appears.

This is because the event hook that I'm using triggers when a user clicks off and when a user closes a file. Without this, there is no other way of tracking (that I know of at the moment) when a user closes a file.

This means that clicking off a file will display this message. Sorry!

Without this, closing a file would keep the old information up, which I feel is less accurate than this current compromise.

7coil commented 3 years ago

If there is actually a new way of detecting when a file is closed, that would be very helpful for me to stop this issue.

JuanSlaterT commented 3 years ago

This is an intended feature. If you click off Microsoft Word, this "Not Active" screen appears.

This is because the event hook that I'm using triggers when a user clicks off and when a user closes a file. Without this, there is no other way of tracking (that I know of at the moment) when a user closes a file.

This means that clicking off a file will display this message. Sorry!

Without this, closing a file would keep the old information up, which I feel is less accurate than this current compromise.

I dont think this as "intended" just tested letting my game status "opened" in another monitor and just started to write some words in my word documment, but it still appearing as "Not Active" I made some clicks too but nothing

I closed the file and re opened it again and it appeared but after a few minutes it went back to Not Active for some reason.

7coil commented 3 years ago

Now that's an issue. What version are you using?

image

JuanSlaterT commented 3 years ago

image it say latest

7coil commented 3 years ago

This issue has gone stale... even if it was my fault for not replying.

If the issue is still there, reply and I'll get back to you.

7coil commented 3 years ago

Good news - There actually is a way to detect this:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/f0f447c5-0d0d-40fb-9fa2-fe14b2eb129d/how-to-detect-a-word-document-is-being-closed-from-a-vsto-addin?forum=vsto

7coil commented 3 years ago

Unfortunately it doesn't seem to work for when the last document is closed for some reason...

garridinsi commented 3 years ago

Hi, I don't know if has to do with this, but when im editing a file it doesn't appear on Discord, it gets stuck on "No file open, Welcome Screen" as on the image

imagen

7coil commented 3 years ago

Yeah, I think it's the same issue still.