IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#19025 - 06/12/06 03:02 PM pass a PP5 variable to VB6
FormMaster Offline
OL Expert

Registered: 05/12/03
Posts: 193
Loc: Los Angeles
Hi there.

I have a small VB6 script that I would like to run from PP5. I want to pass the document name from PP5 to VB6. This is the VB6 line that needs the variable document name:

Set oDoc = oApp.Documents.Open("C:\VP Process\documents\%1.doc")

I put in the %1 as one of your examples shows, but it doesn't seem to work. Anys suggestions?

Thank you.

Top
#19026 - 06/13/06 04:29 AM Re: pass a PP5 variable to VB6
stuartg Offline
OL Expert

Registered: 03/06/03
Posts: 713
Loc: Swindon, England
You can get the values of watch variables into a Vb script by using the ExpandString function
e.g.
str = Watch.ExpandString("%1")

Top
#19027 - 06/13/06 08:23 AM Re: pass a PP5 variable to VB6
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1984
Loc: Objectif Lune, Montreal, Qc
Actually, for variables 1 through 9, you should use watch.getjobinfo(n), where n is a number from 1 to 9.

Stuart's technique is correct as well but it is more costly in terms of CPU cycles as the expandstring function needs to parse the string before returning the value.
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top