Writer: how to use a DDE field in a condition

Discuss the word processor

Writer: how to use a DDE field in a condition

Postby heinrich_d » Thu Dec 05, 2019 2:01 am

I transfer a cell of a Calc-file to a document (writer file) using DDE.
This works perfect.
Now I try to use the DDE field in a condition to create a conditional text.
The DDE field contains a figure. The text shall be different depending on the value of the figure ( >=0).
This seems to be simple but I cannot find out how to do it.
Please help.
OpenOffice 4.1.7
Windows x86
heinrich_d
 
Posts: 5
Joined: Tue Dec 03, 2019 5:44 pm

Re: Writer: how to use a DDE field in a condition

Postby Zizi64 » Thu Dec 05, 2019 8:50 am

I transfer a cell of a Calc-file to a document (writer file) using DDE.


How you did it? By embedding a Calc file? Or some copy-paste?

Please upload two ODF type sample files here (the .ods one and the .odt one).
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.1; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8938
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Writer: how to use a DDE field in a condition

Postby Villeroy » Thu Dec 05, 2019 11:12 am

Do all the calculation in Calc and link the result to your DDE field.
=IF(X1>=0;"this text";"other text")
or
=IF(X1>=0;Y1;Z1)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27901
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Writer: how to use a DDE field in a condition

Postby heinrich_d » Fri Dec 06, 2019 10:39 pm

Zizi64 wrote:
I transfer a cell of a Calc-file to a document (writer file) using DDE.


How you did it? By embedding a Calc file? Or some copy-paste?

Please upload two ODF type sample files here (the .ods one and the .odt one).



I used the menu of the document file:
Insert > Fields > Other > use Tab Variables > Select Type DDE-Field.
Insert a Name for the DDE-Field. Insert the DDE Statement e.g. soffice D:\folder\file.ods name_of_cell_in_calc_file. Use Format DDE automatic.
(The cell in the spread sheet is a named cell.)
OpenOffice 4.1.7
Windows x86
heinrich_d
 
Posts: 5
Joined: Tue Dec 03, 2019 5:44 pm


Return to Writer

Who is online

Users browsing this forum: No registered users and 19 guests