Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 02-16-2013, 04:50 AM
macropod's Avatar
macropod macropod is offline Conditional Fields With String Functions, Office 2010 Windows 7 64bit Conditional Fields With String Functions, Office 2010 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Theodore ,
Quote:
The problem is that these custom fields reside in a building block and their values are derived indirectly from access
That may be so but, in your first post, you referred to "{docproperty customprop1}" and "{docproperty customprop2}". These are custom document properties (not custom fields in a building block) and you can see them if you go to File|Properties|Advanced>Custom. Whatever process populates these custom document properties should be able to populate another one with whatever sub-strings you need. Your building blocks should then be able to reference the new custom document properties in the same way (eg {docproperty customprop3}).
Quote:
String manipulation of custom fields would make my life easier
Whilst I agree the ability to do some string manipulation would make like easier, your options there are extremely limited.

FWIW, although you can't extract the first two characters via a LEFT function, you could use a series of fields to find out what they are. For example, you could retrieve them via field coding like:
{SET Str {docproperty customprop2}}
{IF{REF Str} = "1*" "1"}{IF{REF Str} = "2*" "2"} ... {IF{REF Str} = "A*" "A"}{IF{REF Str} = "B*" "B"} ... {IF{REF Str} = "a*" "a"}{IF{REF Str} = "b*" "b"} etc.
for the first character, and:
{IF{REF Str} = "?1*" "1"}{IF{REF Str} = "?2*" "2"} ... {IF{REF Str} = "?A*" "A"}{IF{REF Str} = "?B*" "B"} ... {IF{REF Str} = "?a*" "a"}{IF{REF Str} = "?b*" "b"} etc.
for the second.

If you have the possibility of any letter or number, that could mean having to work with 62 fields per character - 124 in all, though fewer fields are required if some characters (eg lower-case letters) can be ruled out.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Fields With String Functions, Office 2010 Forms with conditional hidden/visible fields etherplain Word VBA 2 02-05-2013 07:32 PM
Conditional Fields Breaking Down With Large Merge GabeChiarelli Mail Merge 2 01-31-2013 07:17 AM
Conditional Fields With String Functions, Office 2010 2010 Functions Don't Work PaulPCoker Excel 4 09-21-2012 11:26 AM
Conditional Fields With String Functions, Office 2010 Word 2010 - F4/Ctrl+Y functions has short memory alphonse68 Word 1 01-09-2012 03:34 PM
Word not highlighting conditional Merge fields Dunce Mail Merge 0 02-15-2010 05:44 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:51 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft