Converting endnotes to hyperlink for export to WordPress

The following macro will process both footnotes and endnotes, generating hyperlinks for each, including for footnote/endnote cross-references. It’s best to run the macro only after you’ve finished editing. Note that the original footnote and endnote references aren’t deleted – they’re simply converted to hidden text. Quick edit: Crashes with notes that are within bulleted lists. … Read more

How to Clear Office Clipboard with VBA

Saw this on another post, and I have tested it with Word VBA. Just copy and paste into your code where ever you need to clear the Clipboard. Another thing I noticed is that when I .Quit a program, say Excel, it keeps asking me if I want to keep the data is the Clipboard. A work … Read more

How do you display code snippets in MS Word preserving format and syntax highlighting?

Here is the best way, for me, to add code inside word: Go to Insert tab, Text section, click Object button (it’s on the right) Choose OpenDocument Text which will open a new embedded word document Copy and paste your code from Visual Studio / Eclipse inside this embedded word page Save and close Advantages The result looks very nice. Here are the … Read more

Create PDF file using PHP

I have used TCPDF with much success to generate PDF files programatically using PHP. And to generate word documents: http://www.phpdocx.com/ (this is a paid solution).

Excel VBA Macro: User Defined Type Not Defined

Your error is caused by these: These types, Table and Row are not variable types native to Excel. You can resolve this in one of two ways: I have not tested your code but I suspect ActiveDocument won’t work in Excel with method #2, unless you properly scope it to an instance of a Word.Application object. I don’t see that anywhere … Read more