Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Formula in Word

Posted on 2016-09-26
5
Medium Priority
?
31 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 2000 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
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.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
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 …

618 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