Avatar of Mawallace
MawallaceFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

Start a MACRO If statement true - Word

I have a macro in a Word document.

How do I start a macro if a merge filed is a certain value?
Microsoft Word

Avatar of undefined
Last Comment
GrahamSkan
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Sorry Mark,

That isn't possible. You would have to run the merge from VBA, a record at a time, and check the field value before or after the merge for that record and call the macro according to the particular datafield value.

What do you want to do in the macro that would be called? There may be another way to achieve the objective.
Avatar of Mawallace
Mawallace
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

I would like to delete a section of text if the merge field is true. If the merge field is not true, I do not want the section removed.
SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Mawallace
Mawallace
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

What is it is is two or three paragraphs, with formatting such as tables?
Avatar of Mawallace
Mawallace
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Yes - that is right!
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi Mark,

Are we to take it that the penny has dropped, and that you have a full understanding of the method?

Graham
Avatar of Mawallace
Mawallace
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

No - I was trying to make it clearer!

I have  I two or three paragraphs, with formatting such as tables which need including. I would assume this would make the suggested solution of including within an If statement more complicated?
SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Mawallace
Mawallace
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

How do I enter a Quote 34 field?
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Microsoft Word
Microsoft Word

Microsoft Word is a commercial document editing program that is part of the Microsoft Office suite. It features numerous text-editing tools for creating richly formatted documents, along with tools for the use of macros in Word documents. Word's native file formats are denoted either by a .doc or .docx file extension. Plugins permitting the Windows versions of Word to read and write formats it does not natively support, such as the OpenDocument format (ODF) are available. Word can import and display images in common bitmap formats such as JPG and GIF. It can also be used to create and display simple line-art.

30K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo