Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to launch MS Word from Clarion

277 views
Skip to first unread message

Hany Guirguis

unread,
Oct 9, 2001, 11:36:16 AM10/9/01
to
I need to call WinWord from within Clarion to open a file whose name is in a
record's field.
I tried the RUN('WINWORD') function but I get file not found, which is
because in DOS the command returns bad command or file name unless I am in
the Winword directory. Off course I would not know which directory the user
has the program.
Could someone please have the answer in the way that I could view the word
document file from within clarion?

Thanks

Hany


Andrew Ireland

unread,
Oct 9, 2001, 12:35:02 PM10/9/01
to
Hi Paul,

There is a word doc viewer you can use as an activex document if I recall which means it would view in your app. The latest
files specs are now available as I recall, however unless you can cope with other objects like OLE compound objects in the file,
this would be kind of pointless.

Regards

Andy

> If you use the ShellExecute() API call on your document file, it'll run
> whatever application is associated with the file extension. It'll take care
> of running the application for you, whether it's Word, Wordpad or something
> else.
>
> I don't know of any way to view a Word document without using Word. I would
> guess that trying to open the file manually is a long complicated process

Mark Riffey

unread,
Oct 9, 2001, 12:43:23 PM10/9/01
to
In article <3bc31657$1...@news.softvelocity.com>, Paul Attryde wrote:
> I don't know of any way to view a Word document without using Word. I would
> guess that trying to open the file manually is a long complicated process
>

StarOffice will supposedly do so, likewise Word Pro (formerly AmiPro).

---
Mark Riffey
Granite Bear Development
http://www.granitebear.com

Software for professional photography
studios, cultured marble / cast polymer /
solid surface manufacturers and non-profit
organizations

Hany Guirguis

unread,
Oct 9, 2001, 12:46:17 PM10/9/01
to
Could you please explain with an example. I have tried to read on this and
got stuck compiling, so I do not know what is missing in my project in terms
of libraries or include files.

Thanks
Paul Attryde <clarion AT attryde DOT com> wrote in message
news:3bc31657$1...@news.softvelocity.com...
> Hany,
>
> Have you given any thought to the instances where the user doesn't use
Word
> as their word processor?


>
> If you use the ShellExecute() API call on your document file, it'll run
> whatever application is associated with the file extension. It'll take
care
> of running the application for you, whether it's Word, Wordpad or
something
> else.
>

> I don't know of any way to view a Word document without using Word. I
would
> guess that trying to open the file manually is a long complicated process
>

> --
> Paul Attryde
> http://www.attryde.com/clarion
> --
>
>
> "Hany Guirguis" <hgui...@gropiusnyc.com> wrote in message
> news:3bc3...@news.softvelocity.com...

Tim Phillips

unread,
Oct 9, 2001, 1:36:18 PM10/9/01
to
go to http://www.sterlingdata.com/lib.htm
and get the shellexe.zip and install it.
This is a template that uses ShellExec to launch files (it basically is what
happens when you double-click on a
file in Window Explorer). With this, you can open any file with a recognized
extension from inside a Clarion application.
The user will have to have either a) Word B) the wordviewer C) a program that
can read word files (WordPerfect, Star Office...) registered as "owning" the
.doc extension on the PC.

Tim

David Troxell - Encourager Software

unread,
Oct 9, 2001, 1:55:59 PM10/9/01
to
Hany,

If someone has MS Word on their computer, using the SHELLEXECUTE API is
the easiest way to open a file whose name (folder/filename information)
is in a record's field. Here are three templates that will do the job:
First is free, other two are Commercial Clarion Add-ons.

Product Description - Internet Link Template,
MFG - POSitive Software Company
Internet Link - http://www.clarioncentral.com/freestuff.htm

Product Description - HyperActive, MFG - CapeSoft
Internet Link - http://www.capesoft.com/accessories/hypersp.htm

Product Description - PowerRUN, MFG - Berthume Software
Internet Link - http://members.aol.com/GBerthume/powerrun.htm

As for viewing the word document from inside Clarion, I don't think
anyone has a ready made solution for Clarion apps, but as Andy Ireland
indicates, it's doable, just not easy.

David

In article <3bc3...@news.softvelocity.com>, hgui...@gropiusnyc.com
says...

--
From David Troxell - Product Scope 32 PRO - Encourager Software
Email - mailto:Dav...@encouragersoftware.com
Clarion Third Party Profile Exchange Online
http://encouragersoftware.com/profile/clarlinks.html
http://www.encouragersoftware.com/

James Cooke

unread,
Oct 9, 2001, 2:58:52 PM10/9/01
to
Use shellexecute on a empty .doc file.
http://www.clarionfoundry.com/API/WinAPI/shf.htm

--
Kind regards,
James Cooke
=================================


"Hany Guirguis" <hgui...@gropiusnyc.com> wrote in message
news:3bc3...@news.softvelocity.com...

James Cooke

unread,
Oct 9, 2001, 6:01:24 PM10/9/01
to
Use shellexecute on an empty text file with the extension of .doc.
See http://www.clarionfoundry.com/API/WinAPI/shellexec.htm
for infor on Shellexecute

--
Kind regards,
James Cooke
=================================
"Hany Guirguis" <hgui...@gropiusnyc.com> wrote in message
news:3bc3...@news.softvelocity.com...

Arnor Baldvinsson

unread,
Oct 9, 2001, 7:49:13 PM10/9/01
to
Hi Hany,

On Tue, 9 Oct 2001 11:36:16 -0400, "Hany Guirguis"
<hgui...@gropiusnyc.com> wrote:

>the Winword directory. Off course I would not know which directory the user
>has the program.
>Could someone please have the answer in the way that I could view the word
>document file from within clarion?

You need to use API calls to do this. There is a small demo on
icetips that demonstrates how to find the program exe file for any
extension that has been associated.

ftp://ftp.icetips.com/pub/misc_files/findexe.zip and
ftp://ftp.icetips.com/pub/misc_files/findexe.txt

Best regards,


Arnór Baldvinsson
San Antonio, Texas, USA
www.icetips.com & www.candobidding.com
ar...@icetips.com
ICQ: 113314380

0 new messages