Comments (10)
It's probably easier to add some support for it. Not sure if i will have time, but I'll play with it soon
from officeimo.
As long as it works for you ;) My implementation is a bit more complex, but it just simplifies things.
using (WordDocument document = WordDocument.Load(filePath)) {
foreach (var footNote in document.FootNotes) {
foreach (var paragraph1 in footNote.Paragraphs) {
if (paragraph1.IsHyperLink) {
paragraph1.Hyperlink.Text = "xxx";
}
}
}
}
from officeimo.
I don't think it's currently supported. Neither are endnotes.
from officeimo.
thanks for the quick response
from officeimo.
By not supported I mean they are not directly exposed in easy to use way - but with some effort you could get them. Probaby easier to add this functionality into officeimo for others to use.
from officeimo.
Can you make a small example, how I get the footnotes from the document? I currently need to replace all hyperlinks in a project, including those in footnotes.
from officeimo.
@A10s while I am not done with the PR, maybe this is something that will get you started already. You can add, find foot notes and modify them for now. If you're willing to compile your own version it may be just what you need for now. I'll probably finish it in few days if i get enough time. End notes are not done either.
from officeimo.
Thanks for the answer. I've already found how to get to the footnotes and the hyperlinks they contain
from officeimo.
my code:
var doc=WordDocument.Load("test.docx");
var footnotesPart = doc._document.MainDocumentPart?.FootnotesPart;
if (footnotesPart != null)
{
var footnotes = footnotesPart.Footnotes.Elements<Footnote>();
foreach (var f in footnotes)
{
var hyperlinks = f.Descendants<Hyperlink>();
foreach (var hyp in hyperlinks)
{
var id=hyp.Id;
var hrs=footnotesPart .HyperlinkRelationships.Single(q => q.Id == id);
var uri= hrs.Uri;
........
}
}}
from officeimo.
Thank you for your support!
from officeimo.
Related Issues (20)
- Stable and unlikely to change vs unstable and subject to change vs depreciated api HOT 13
- How to add paragraph without pagebreak? HOT 4
- ContentControls.Add() is trimming space from user selection HOT 1
- How to display the specific gravity value in a pie chart HOT 2
- How to add image watermark? HOT 3
- how can I add a table with two rows and each row had diff columns and width? HOT 1
- Issue with Text Replacement in Multi-Line Text Boxes HOT 1
- ConditionalFormattingFirstColumn sample HOT 2
- [Question] Does OfficeIMO provide support for HTML fragments? HOT 4
- [Question] Is Save As Web Page support? HOT 2
- Repeat as header row at the top on each page HOT 6
- How do I set the first column style of a table not to be bold HOT 2
- WordParagraph.Style can throw an exception HOT 3
- MergeVertically not working on Rows[0].Cells[0] HOT 1
- How to access all of document contents in correct order? HOT 3
- WordParagraph.IsFirstRun and IsLastRun can throw a null reference exception
- Superscript / subscript support? HOT 1
- Figuring out NestedTables HOT 5
- Table With no rows HOT 1
- Repeat Table Headers on Every Pages HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from officeimo.