-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Export with attachments #518
Comments
MS Office attachments, whether in Word or Outlook or OneNote, are all absolute. I don't believe there is a way to add relative references. This is true for OLE embedded objects like you mention in option #2. These would be the same as the hyperlinks that OneMore adds to the docx file currently, but a little prettier. |
I played around with the embedded objects I used to make the screenshot above and noticed that they can be accessed and edited even if I delete the initial file from my laptop. This is true if the user ticks "Display as icon" when inserting the object. So I think option 2 might be a workaround even given that all links are absolute. It might come in handy in case the user does not want to worry about links becoming broken due to possible changes in file paths in the future. |
There is an option to either embed the file as an object or link to the file. You've elected to embed the file. This means it is divorced from the source file and changes to either won't be reflected in the other. So it was quite easy to embed or link to a file with an icon (already have a working prototype!) and I could add options to the Export dialog asking to either embed or link. If it can't find an associated OLE automation application registered, it will revert to the hyperlinked absolute file as it does now. |
Great, I got it. Thank you! |
Here am I again... I gave it a try a couple of days ago, and everything was just right. However, recently I have completed the reinstallation of my OS (Win10) and reinstalled OneNote with OneMore, and since then it only rarely embeds files - mostly, there are absolute links instead (I am not sure if this reinstallation has something to do with it, it just seems strange to me given that before everything was ok). As it follows from your explanation, this happens when it can't find an associated OLE automation application registered. I wonder if there are certain instances that can prompt such behaviour. |
Sorry you're having problems again. It does sound like your assessment is right. Do you have an app installed that opens these files by default? I think it would be super annoying to prompt for every attachment that doesn't have a default app installed. Of course I could make that a preference but then again, why would you have attachments that you can't open?!?! |
Yes, I have default apps for these files. I have just tried to export a page with files both with and without default apps and the result was the same, i.e. all these files were exported as absolute links. |
What is the app? |
Word, Excel, PowerPoint (defaults for docx, excel sheets, ppts, respectively) and tar.gz archive with no default app |
I used a Windows API to discover the default registered app. Perhaps the API doesn't consider all configurations. I'll need to do some investigating but not sure I know how to reproduce it. |
I figured out a better way to lookup the registered application. I'll add it to the next release. |
When exporting onenote page with attachments to docx, the attachment is saved in the same directory as the page itself, and the link to it is given. But if the user changes the directory of the attachment then the link will become broken until the user manually fixes it. It would be great if there was a way to avoid this problem. Probably it would be possible to:
P.S. Thanks for fixing the issue of broken links with non-Unicode characters and for such a great add-in to OneNote :)
The text was updated successfully, but these errors were encountered: