Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-22-2003, 07:04 PM
davidevery davidevery is online now
Registered User
 
Join Date: 06-03-2003
Location: Sydney Australia
Posts: 16
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
Reply With Quote
  #2  
Old 06-22-2003, 10:09 PM
pjaquiery pjaquiery is online now
Registered User
 
Join Date: 01-20-2003
Location: Dunedin, New Zealand
Posts: 114
You need ExpandMacros:

strReturn= Application.ExpandMacros (macro.Value)
Reply With Quote
  #3  
Old 06-27-2003, 01:55 AM
davidevery davidevery is online now
Registered User
 
Join Date: 06-03-2003
Location: Sydney Australia
Posts: 16
Thanks !

so easy when you know how !

Regards
David E
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:02 PM.


Copyright © 1999-2023 Kinook Software, Inc.