4D Blog

Home Tips 4D Write Pro: WP commands and beyond

4D Write Pro: WP commands and beyond

November 26, 2018

Tips

We’ve received comments on the forum and TAOW about features that previously existed in the 4D Write plug-in but seem to be missing in 4D Write Pro. Yet, they’ve been available for a long time!

In this blog post, we’ll go through a list of existing abilities in 4D Write Pro that seem to have gone unnoticed. In another words, 4D Write Pro features you didn’t know existed.

After all, 4D Write Pro is not limited to WP commands!

Create an off-screen document

“Where are 4D Write’s off-screen commands?” These commands don’t exist anymore in 4D Write Pro, simply because they make no sense.

The 4D Write Pro document is a 4D object. A complex object with many attributes and several levels of involvement, but always an object. First, you instantiate your object with WP NEW. Then, you can manipulate it in memory with 4D commands. At the end, if you want to see what the document looks like, associate your object with a 4D Write Pro area to display it on the screen.

Manipulate the 4D Write Pro area

The 4D Write Pro area is a form object just like other form objects. Thus, the “OBJECT” theme commands apply to the 4D Write Pro area.

For example, you want to display a document as read-only in order for a user to be able to read the document and select parts of it to copy, but not modify the document. It’s very simple, use the classic command: OBJECT SET ENTERABLE.

OBJECT SET ENTERABLE(*;"wpDoc";False)

Printing

4D Write Pro is fully integrated in 4D. So 4D’s printing commands also apply to 4D Write Pro, such as SET PRINT PREVIEW, PRINT SELECTION, etc. Check out these old blog posts on the different possibilities for printing.

Let’s say you want to send an invitation to each of your customers, and in the header of your document, you want to change the first and last name for each customer. Easy:

// Get your 4DWP sample
QUERY([WP_Samples];[WP_Samples]SampleName="Thanks")
// Query your data
ALL RECORDS([People])
SET PRINT PREVIEW(True) // No need to waste paper
OPEN PRINTING JOB
APPLY TO SELECTION([People];WP PRINT([WP_Samples]Sample))
CLOSE PRINTING JOB

Insert page number or other expressions

You want to insert the page number in the footer of a document, but you can’t find the WP command to insert an expression? Did you look in the ST command theme?

It’s never too late. Check out the ST INSERT EXPRESSION command:

$footer:=WP New footer($subSection)
$oNewRange:=WP Create range($footer;wk start text;wk end text)
ST INSERT EXPRESSION($oNewRange;"$wp_pageNumber")

In the same way, you can add the total number of pages, the creation date, and so on. See the documentation for more details.

To conclude …

Something important to consider: 4D Write Pro is integrated in 4D, which means that you can use 4D commands on a 4D Write Pro area. You’re not limited just to the WP commands.

So think outside the box. A lot of things can be achieved with 4D Write Pro. The sky’s the limit.

Discuss

Tags 4D Write Pro, Programming, Word processor

Latest related posts

  • March 27, 2026

    AI Coding with 4D and VS Code: A Practical Guide

  • September 15, 2025

    Find the right spot in your 4D Write Pro document with AI

  • September 2, 2025

    Intelligent 4D Write Pro document analysis with AI

Vanessa Talbot
Vanessa Talbot
• Product Owner •Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • AI
  • Release infos
  • 4D View Pro
  • 4D Write Pro
  • Email, Microsoft 365, Gmail
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • 4D Qodly Pro
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 21 Administration AI Artificial Intelligence Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience vscode Web Word processor

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 21 Administration AI Artificial Intelligence Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Microsoft 365 Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience vscode Web Word processor
Subscribe to 4D Newsletter

© 2026 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy