Find Jobs
Hire Freelancers

VBScript Syntax: Nested IF MS Word Merge Field

$10-30 USD

Closed
Posted about 3 years ago

$10-30 USD

Paid on delivery
I need a macro that places a conditional merge field with a nested IF statements. Currently, we copy the merge fields from one document and paste them into an endless amount of different Word documents. In other words, I want to replace the source document with a command button that inputs the conditional merge field. I’m currently using the expression: [login to view URL] Range:=[login to view URL], _ MERGEFIELD:="""Client_MiddleName""", Comparison:=wdMergeIfIsNotBlank, _ TrueText:="MERGEFIELD "Client_MiddleName"", _ FalseText:="" I hit a barrier placing “Client_MiddleName” merge field if true (TrueText). The output should be: { IF {MERGEFIELD “Client_MiddleName” }<>”” “{MERGEFIELD “Client_MiddleName” }” “” }
Project ID: 29156115

About the project

1 proposal
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
1 freelancer is bidding on average $72 USD for this job
User Avatar
Hello, You haven't said what the barrier is but I guess your code results in text containing MERGEFIELD, rather than the value of Client_MiddleName (if it's not empty). Changing the code to fix this is easy. Cheers, Fred
$72 USD in 7 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Chicago, United States
0.0
0
Member since Feb 3, 2021

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.