I have searched the forum and the Base pdf file, cannot find an answer to my question.
I am a LibreOffice novice.
How do I execute a dde call in Base? Perhaps someone has a snippet of code they might share?
Thank you.
Execute a DDE call in Base
Execute a DDE call in Base
Version 4.3.7.2 on Windows 7 Pro
Re: Execute a DDE call in Base
Hi,
in my opinion, it's not that simple, 'cause i couldn't find a way to use DDE via Starbasic without an OpenOffice-crash.
So i tried this way, which works:
R
in my opinion, it's not that simple, 'cause i couldn't find a way to use DDE via Starbasic without an OpenOffice-crash.
So i tried this way, which works:
- load a calc-doc
- containing the DDE-Link
- hidden mode
- from a BASE-document
- add a DDE-refresh listener ("com.sun.star.util.XRefreshListener") to the DDE-Link in the calc-doc
- refresh the link once by code, to activate it
- on _refreshed Event, insert a new row into the database
- DDE_Source.ods to simulate a DDE-Source
- DDE_Bridge.ods loaded in hidden mode, receiving the Values from DDE_Source.ods
- DDE_Target.odb the stearing file, DDE-values will be inserted into table DDE_RESULT
- Open DDE_Source.ods
- select cell A1 on Sheet 1 and copy it to the clipboard.
- open DDE_Bridge.ods
- insert clipboard-content as DDE-Link to cell A1 of Sheet 1 of DDE_Bridge.ods to replace my current DDE-Link
- store both calc-docs
- close DDE_Bridge.ods
- be shure to have adjusted macro-security at least to middle, that you can run macros
- open DDE_Target.odb
- open Form DDE_RESULT
- change to DDE_Source.ods
- enter a new value into cell A1
- observe Form DDE_RESULT
R
- Attachments
-
- DDE_Source.ods
- (7.18 KiB) Downloaded 335 times
-
- DDE_Bridge.ods
- (7.34 KiB) Downloaded 386 times
-
- DDE_Target.odb
- (13.28 KiB) Downloaded 275 times
- MMove 1.0.6
- Extension for easy, exact positioning of shapes, pictures, controls, frames ...
- my current system
- Windows 10 AOO, LOLinux Mint AOO, LO
Re: Execute a DDE call in Base
Thank you very much for replying with lots of detail. I'll try this just as soon as possible. I am a novice LibreOffice user so I'm sure I'll have more questions.
Version 4.3.7.2 on Windows 7 Pro