I'm trying to convert inline text that is surrounded by [footnote] and [/footnote] tags into normal footnotes. Can you share some advice?
I'm trying to convert inline text that is surrounded by [footnote] and [/footnote] tags into normal footnotes. Can you share some advice?
A footnote requires both a footnote reference in the body of the document and the actual footnote content (which goes in the footnote). So far, your post seems to identify only the footnote content. What indicators are there for the footnote reference?
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
I have number of footnote as number before [footnote]. Does this help?
In that case, you could use a macro like:
Note: the above code will preserve any formatting your footnote text already has.Please Login or Register to view this content.
Thanks for your effort, I have tried it and I got error 5560 "The Find What text contains a Pattern Match expressions which is not valid". In sub line .execute is where code stops.
That will be due to your Windows Regional Settings. Change:
.Text = "[0-9]@[ \[]{1,2}footnote\]*\[/footnote\]"
to:
.Text = "[0-9]@[ \[]{1;2}footnote\]*\[/footnote\]"
I am trying something using http://www.gmayor.com/replace_using_wildcards.htm but I am surely not not advanced user .
You are word master, thank you very, very much . I will give my best to learn from your site and examples. Thanks again
The process I used employs a wildcard Find expression, as per the gmayor site, but you can't use Find/Replace on its own to turn your body text into footnotes.
Thanks again, I could not do it without you
One more thing, if I would like to have numbers added automatically before [footnote] in inline text what would I have to do? Can you suggest code for this? That would be big help for me, now I have to check numbers before placing new ones. This is what I have so far.Thanks
Please Login or Register to view this content.
Last edited by tomislav1975; 10-27-2014 at 12:27 PM.
For the purposes of the macro I supplied before, it really doesn't matter what the numbers are. For all it cares, they could all be the same or completely random. Indeed, it could even be modified to work without them, just by changing:
.Text = "[0-9]@[ \[]{1;2}footnote\]*\[/footnote\]"
to:
.Text = "\[footnote\]*\[/footnote\]"
If you're wanting to add the numbers for other purposes, though, you could use code like:
Note that the above code re-numbers any tagged text you've already numbered, in case you've already done some tagging & numbering, then inserted new tagged text in between.Please Login or Register to view this content.
Last edited by macropod; 10-27-2014 at 06:47 PM.
Thank you very much, I have learned a lot. I really appreciate your time and knowledge.
Post #10 cross-posted at: http://www.mrexcel.com/forum/general...nt-inline.html
For cross-posting etiquette, please read FORUM RULE 8: http://www.excelforum.com/forum-rule...rum-rules.html
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks