PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → WinDev embedded OLE (Word) - Possible? or work-around?
WinDev embedded OLE (Word) - Possible? or work-around?
Débuté par DerekM, 15 juil. 2016 14:35 - 17 réponses
Posté le 15 juillet 2016 - 14:35
Hi

There are a few posts re this issue circa 2012 - but there was no solution - and I think it might be out of scope for WinDev

The requirement is a Word document embedded in a WinDev window (e.g. in VB
' Create a new Word Document...
OLE1.CreateEmbed vbNullString, "Word.Document").

So it is possible in VB etc - and I also did this in some other 4GL many many years ago. It is important that the Word object is embedded to maintain proper work-flow and ensure that the document is stored in the database. The Controlling Word example with the OLE cWord class is not sufficient (as there are 2 threads controlling the Document - Word and WinDev/OLE).

I suspect that there is no easy, direct way of doing this in WinDev. I guess I could just use VB for this bit - and ShellExecute - but it seems a bit clumsy.

Has anyone else resolved this? I'm still using WinDev 19 but I thought there might be a better approach - i.e. - is there a clever way of integrating a Vb or .Net screen with WinDev?

TIA for any input or suggestions.

Regards,
Derek
Posté le 15 juillet 2016 - 15:02
Hi Derek,

yes it's possible BUT, M$ doesn't want us to do that anymore...

So in the newest versions of office, M$ prevents us from doing so and the document opens in word outside the program...

there is a work around "kind of working" by settings key values in the registry, but it's a bumpy ride and may or may not work at all depending on the version of office...

This is why I chose to use txTextControl to do exactly what you are describing, open word documents inside my WXEDM (available as open source on my site)

Best regards
Posté le 15 juillet 2016 - 15:27
Je vous remercie beaucoup, Fabrice!

I don't fancy fiddling with the Registry! I'll have a look at txTextControl ;)
Posté le 15 juillet 2016 - 17:06
Hi Fabrice

:( unfortunately - WXEDM is Vers. 20 - I'm stuck with Vers. 19 and can't read anything.

If possible - could you provide a brief description of the approach you took with txTextControl ?

Best Regards
Derek
Posté le 15 juillet 2016 - 17:51
Hi again

I can do you one better...

watch the videos for WXEDM, everything is described in it, including txtectcontrol

Best regards
Posté le 15 juillet 2016 - 18:11
Hi Fabrice,

Were you able to get spell check to work in text Control? My recollection was that that was not possible.

Thanks!

Steve
Posté le 18 juillet 2016 - 03:35
Hi Steve

I am in the same position with that textcontrol activex that you were last year (automation error)

You said: i got a new test version from them, now it works.

So far, I have had no response from their 'support agents'. Obviously the latest version has not resolved the WinDev issue.

If you are still using this (without spellchecker) - can you otherwise provide a brief comment on it's usability.

This is one area where I seem to have forgotten more than I know - because I "discovered" a VB module that I wrote years ago probably (because of the cost of components such as textcontrol.com). I don't think that I want to go down that path again so I will wear the costs if I know that it will work. Maybe just buy it now rather that work with the 30-day version that doesn't work?

Thanks & Regards
Derek
Posté le 18 juillet 2016 - 12:13
Hi,

I`ve been running TXControl (v13) Activex since 2004/2005 with a clarion App and working Spell control , If you want i can dig into that old code and see how it was solved.

However I think it`s a new way of doing spell control with the newer versions of TX Control (TX Spell.NET)

Fabrice, Do you use the .NET version of TXControl or the Activex/Com? - I might purchase the latest version for use in a project.

Cheers
Tor-Bjarne
Posté le 18 juillet 2016 - 15:36
Hi

My support request to txcontrol didn't get too far

Thank you for contacting TX Text Control Support.

TX Text Control works in WinDev as other customers are using it in their project and applications.

However, WinDev is not an officially supported development environment so we do not have any starter guides or additional information how to use it.

Can I plead for a bit more information from those who have this working in WinDev. Is the 'automation error' due to WinDev not finding the ole objects? Did anyone have to do anything special to get this to work with WinDev? Will it work in test mode or do you have to build the project? Has anyone had any success with the 'trial' version (or how do I get the 'full' version to test before buying?)

TIA

Regards,
Derek
Posté le 18 juillet 2016 - 15:54
Hi

The problem with the trial version goes away if you start WinDev as administrator (Windows 10).

Regards
Derek


Resolved (by Pierre 2013)

Si c'est la version démo, j'ai déjà eu des comportements bizarres qui
disparaissent si on lance WD en mode administrateur.

Dès que la version enregistrée remplace la démo, tout rentre dans
l'ordre.

Cordialement,

--
Pierre
Posté le 18 juillet 2016 - 15:58
Hi everybody

@Steve: I haven't used the spellchecker (not enough time), but I know that it's possible, and there is a thread on the french WinDev forum with explanations on how to do it.

@Tor: I have been using the activeX (4 of them, in fact)

And I confirm, I remember having the problem in test mode, and switching to admin mode solved it.

Best regards
Posté le 18 juillet 2016 - 16:19
Hello Derek and Tor-Bjarne,

There is an alternative to TXTextControl called TE Edit Control. It is from SubSystems (http://www.subsystems.com/) and has support for using it through (Dll) API or Activex.

Do check it.

Yogi Yang
Posté le 19 juillet 2016 - 03:10
I am still a little confused with the available packages from textcontrol.

It is working OK with 32 bit - but not with a 64 bit compile.

The ActiveX package appears to have one build only (32 bit?)

The .Net package states that it works either 32/64

Fabrice - back in 2014 on the French forum - you said - I think - that the activeX will compile either 32/64. However - the documentation you linked to ( http://www.textcontrol.com/en_US/support/documentation/dotnet/n_intro_3264bit.htm ) appears to be the .Net version only.

Can anyone confirm please, that the ActiveX will work with a Windev 64 build?

Thanks again for any assistance!

-- update --
Thank you for contacting TX Text Control Support.
TX Text Control ActiveX does not come in a 64-bit version, sorry.


Regards,
Derek
Posté le 20 juillet 2016 - 20:43
Hi,

Quote
Derek

Can anyone confirm please, that the ActiveX will work with a Windev 64 build?

I was under the impression that ActiveX was a 32 bit technology.

Quote
Yogi Yang

There is an alternative to TXTextControl called TE Edit Control. It is from SubSystems (http://www.subsystems.com/) and has support for using it through (Dll) API or Activex

Yes - But a licence cost 5-600$ pr functionality (as doc to PDF,DocX to PDF etc, where as TX Control will the the whole lot with one license,

Cheers
Tor-Bjarne
Posté le 20 juillet 2016 - 23:42
Hi Tor-Bjarne

It's apparently a yes and no situation with ActiveX. MS still use it in a few places but it needs some sort of ipc wrapper and the wow64 registry. Not sure, but I would have thought that a full-time techo could figure something out.

Yes that TE Edit is too expensive.

As I need to distribute 64 bit due to other constraints, I will have to spawn another process to handle the document txt control requirements with activex. That is, until I get the dot net version working. Basic dot net integration appears to work just fine but I am encountering a number of user interface issues with textcontrol. If I ever get it working I'll let you know.

Regards
Derek
Posté le 21 juillet 2016 - 07:45
Hi Derek,

I dont know if you already purchased TXControl, but it you are going the .NET route in WinDev I would consider DevExpress for winforms , the product seems to do a lot of TX Control and more. :D

Cheers
Tor-Bjarne
Posté le 21 juillet 2016 - 15:35
Quote
DerekM

Hi Steve



I am in the same position with that textcontrol activex that you were last year (automation error)



You said: i got a new test version from them, now it works.



So far, I have had no response from their 'support agents'. Obviously the latest version has not resolved the WinDev issue.



If you are still using this (without spellchecker) - can you otherwise provide a brief comment on it's usability.



This is one area where I seem to have forgotten more than I know - because I "discovered" a VB module that I wrote years ago probably (because of the cost of components such as textcontrol.com). I don't think that I want to go down that path again so I will wear the costs if I know that it will work. Maybe just buy it now rather that work with the 30-day version that doesn't work?



Thanks & Regards

Derek

Hi Derek,

I wasn't able to able to get the spellchecker working so I scrapped it. That was a show stopper for me, especially as it's quite an expensive component.

I ended up using XStandard HTML Editor which suited my needs which largely revolved around email editing.

Steve
Posté le 25 juillet 2016 - 13:05
Hi Steve

Yes. Different solutions depending on the precise requirement !

So, for me, I am scrapping TextControl/TXControl - and using the text control that already exists and comes free with WinDev.

RTF Control and functions like RTF Replace pretty much give me most of what is really required. I think I was rather fixated on Word as the solution for automation. I can do all the 'automation' and editing in WinDev - and export to Word or PDF or whatever as required. Should be able to get spell-checking too. A couple of small down-sides - but simplicity is a big plus for me :)

Thanks all for your input. Thought I'd add my solution here in case it is useful to someone.

Regards
Derek