Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to display the data in the form of combobox with values 'yes' and 'No'. If he select 'yes" i should get like this( ask for filename to include entire path).
Hi Boppy,
try this:
IF vGetFileName = 'Yes' THEN
let vFileName = Input('Enter Filename:', 'Input box');
END IF
- Ralf
But, how can i display the values yes and no in Inputbox..
Hi,
Which component are you using? And where do you paste this code?
Thanks
Using Input Box,
the code goes to the load script.
- Ralf
Hi Ralf,
Thanks for u solution. But, when i use the code in the edit script and reload the script i getting the Input box. My task is not like dat. The task is when i select the Yes in the input box. I shoud get the Input box asking "Enter the filename"..But, once again thanks to give me solution. I hope u understood my problem. I'm waiting for the solution.
Ok, now I hope to understand.. 😉
You could have one input variable for the filename too. If it's filled with a filename and the other variable is set to 'Yes' you can use the filename in the scrpit. Otherwise you use the standard filename in the script.
- Ralf
Hi,
You would need to place a trigger on the input variable vGetFileName
Settings > Document Properties > Triggers > Variable Event Triggers
Select vGetFileName and click Add Action(s)...
Add > External > Run Macro > Edit Module
Paste in the Edit Module, the following code:
Sub GetFileName
Set a=ActiveDocument.Variables("vGetFileName")
In_val=a.GetContent.String
if In_Val = "Yes" Then
tmp = inputBox("Input your FileName")
ActiveDocument.Variables("vFileName").SetContent tmp, true
End If
End Sub
And make sure to fill the right MacroName ("GetFileName")
And that is it. See the attached example.