Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   macros containing macros (https://www.kinook.com/Forum/showthread.php?t=134)

davidevery 06-22-2003 07:04 PM

macros containing macros
 
Hi, I am having a little hassle with the following situation. I have 2 project macros as follows:

The first Macro is called BUILD_DRIVE and its value is "D:"

The second Macro is called WORKING_ROOT and its value is "%BUILD_DRIVE%\Directory1\Directory2"

I am attempting to retrieve the value of the second macro (WORKING_ROOT) inside a VBScript step as follows:

set macros=Application.Macros(vbldProject)
set macro = macros.Item("WORKING_ROOT")
strReturn= macro.Value

what I get returned into strReturn is "%BUILD_DRIVE%\Directory1\Directory2" which is unusable, it doesnt appear to substitute the BUILD_DRIVE macro

I assume I am doing something wrong but have no idea what it is, can anyone help ?

Thanks in advance for your time...

Regards
David Every

pjaquiery 06-22-2003 10:09 PM

You need ExpandMacros:

strReturn= Application.ExpandMacros (macro.Value)

davidevery 06-27-2003 01:55 AM

Thanks !

so easy when you know how !

Regards
David E


All times are GMT -5. The time now is 09:53 AM.


Copyright © 1999-2023 Kinook Software, Inc.