fieldcodes

test for error returned by TOC field code

喜夏-厌秋 提交于 2021-01-28 08:00:54
问题 I am trying to test whether any "figure captions" exist before I create a Table of Figures. I have a line of code that works: {IF {TOC \h \z \c "Figure"} = {TOC \h \z \c "blarghel"} " No table" "Entries exist"} (field codes, of course), where "blarghel" is a deliberate dummy. I thought I used to be able (in Word 2003) to quote the error string returned, which for WORD 2010 would be {IF {TOC \h \z \c "Figure"} = "No table of figures entries found." " No table" "Entries exist"} But that always

How do I display the next month in a Microsoft Word field?

*爱你&永不变心* 提交于 2020-01-03 03:37:05
问题 I'm needing to display the name of the month after the current month in a Word 2003 document. It's fairly easy to display the current month: { DATE \@ "MMMM" } At the time of this writing, this displays: September What I'm wanting to display is October...and for the life of me I cannot work out what needs to be done. I've been trying to follow the advice on addbalance but without much luck: { = { Date \@ "MMMM" } + 1 } Does anyone know what command I need to write to be able to accomplish

Primitive MailMerge using just delimited field names

▼魔方 西西 提交于 2019-12-14 01:35:30
问题 Obviously the correct way for our app to generate a Word document based on a template is to encourage the admin users (who will look after the templates) to embed the correct merge fields or bookmarks in the template document. However in the past we have found our typical admin user who ordinarily doesn't use MailMerge or any of the other "advanced" features in Word is significantly put off by having to use merge fields. We have tried doing it for them, producing documentation, lots of

MS Word: Mailmerge hyperlinks with query get URL string with a MERGEFIELD

拟墨画扇 提交于 2019-12-12 05:03:24
问题 I'm trying to send an email merging one document (.docx) with a contacts database (via OleDB). Using MS Word 2007, it seems easy (it works for easy things: name, address, ...) but I can't find how fill an query-get URLD string with a merge field inside an hyperlink. An hyperlink like: Click here where here is an hyperlink to http://domain.com/test.php?contact=contact@contactdomain.com where contact@contactdomain.com is the address of the contact, a merge field. I've tried the special/merge

Word 2010 can Field added via QuickParts be given an ID and later referenced in document.Fields collection

百般思念 提交于 2019-12-11 07:56:53
问题 I need to add a few fields to a Word 2010 DOTX template which are to be populated automatically with custom content at "run time" when the document is opened in a C# program using Word Interop services. I don't see any way to assign a unique name to "Ask" or "Fill-In" fields when adding them to the template via the QuickParts ribbon-menu option. When I iterate the document.Fields collection in the C# program, I must know which field I'm referencing, so it can be assigned the correct value. It