Solved

Formula in Word

Posted on 2016-09-26
5
28 Views
Last Modified: 2016-11-08
I need a formula that test the contents of the Tags field in Word.

Our firm has a line at the bottom of correspondence with reads
SPC:  via Certified Mail #1111 0000 0000 0000 0000 - Return Receipt Requested
or
SPC:  via Fedex Airbill #
or
SPC:  hand deliver or other language, but no numeric values.
or
the SPC line does not appear at all if the Tags field is blank.

Tags field in Properties will either have a number greater than 1000000000000000000 (Certified Mail)
greater than 100000000000 and less than 1000000000000000000 (Fedex)
or verbiage, if any, which should appear exactly as written
0
Comment
Question by:Bill Golden
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 41815977
Is the Tags field a custom document property?

What sort of formula are you looking for - a test using Word Fields, VBA or something else?
0
 
LVL 1

Author Comment

by:Bill Golden
ID: 41817371
Tags is a standard field used by Word. It is in the Word properties section.

Previously, Word 2003, we used Word fields with an If Statement
0
 
LVL 1

Author Comment

by:Bill Golden
ID: 41817402
Currently, I have the following formula...

IF TAGS<1000000000000000000 "Fedex Airbill # "Tags"" "Certified Mail #"Tags" - Return Receipt Requested" \* MERGEFORMAT

I do not understand the nomenclature involved to get the value of Tags to print and my IF statement is not working.
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 41817765
Tags in that sense are data external to the Word document file., so copying the document doesn't copy the Tags.  They are seen in the document properties 'Keywords, so you would need to use the DOCPROPERTY field. The next condition would be nested in the False part of the previous condition.
{ IF {DOCPROPERTY Keywords} <  1000000000000000000 "Fedex Airbill # " { IF {DOCPROPERTY Keywords} >  100000000000 "Certified Mail" "...}}
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question