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

Opening WP doc from VB on NT4 w/stn

4 views
Skip to first unread message

Sam

unread,
Dec 1, 2000, 3:00:00 AM12/1/00
to
Hi,

Has anyone had this problem ? I'm using this code to open a wpd;

Dim objWP As Object
Set objWP = CreateObject("WordPerfect.PerfectScript")
objWP.FileOpen "C:\Program Files\XYZ\letter.wpd"
'commented out code about populating bookmarks
objWP.Quit
Set objWP = Nothing

My problem is that although the system seems to start WordPerfect, it
doesn't start as an application. It is registered in Task Manager as a
process, but it doesn't get beyond that...

Any ideas ?
Many thanks
Sam (sama...@magna.com.au)


Chip Orange

unread,
Dec 1, 2000, 3:00:00 AM12/1/00
to
I think you need to call .AppMaximize immediately after creating the
perfectscript object.

Chip Orange


"Sam" <sama...@nospammagna.com.au> wrote in message news:3a2737dd@cnews...

Sam

unread,
Dec 2, 2000, 3:00:00 AM12/2/00
to
Chip,

Thanks so much. This works:


Dim objWP As Object
Set objWP = CreateObject("WordPerfect.PerfectScript")

objWP.AppMaximize
objWP.FileOpen "C:\Program Files\XYZ\Direct.wpd"

objWP.BookmarkBlock "Title"
objWP.Type oCase.Salutation.KeyValue & ""
'ETC

Cheers
Sam

"Chip Orange" <cor...@psc.state.fl.us> wrote in message
news:3a27a73f@cnews...

James M Moore

unread,
Dec 7, 2000, 3:00:00 AM12/7/00
to
The reason you need the AppMaximize command is because you are basically
telling WP how to run. By not having the command, you tell WP to run as a
background and "hidden" application. You can work in the document, and print
stuff, but the WP UI doesn't come up. Having AppMaximize tells WP to launch
as a visible application.

Knowing this might be helpful if you want to create something in WP without
the possibility of user interaction.

Have a nice day, all!

James

JamesMM.vcf
0 new messages