Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to check document variable 1

Status
Not open for further replies.

Ajaygupta

Programmer
Mar 24, 2003
21
0
0
IN
Hi

please help me

problem- In one report I have created a variable -lastdayofmonth. I want to check this variable using macro. condition is " if lastdayofmonth=systemdate then msgbox "Please take a backup" or please save into xls file.
so that user can have a xls file every month for making the MIS reports for management.

rgs

ajay
 
Hi digatal1234,

Do you want to just display a messagebox based on the createdvariable????? Would help us to provide solutions if you can provide more details!!

Regards,
Sridharan
 
Dear Sridharan
I want to write a macro, in which I want to put condtion that for that-

I have createed one variable- let say x ( lastdayof month) in report itself

user is refreshing every day this report. throuhg macro I want to check if sysdate= x then data will automatic export in txt file.

rgs
 
To access Document Variable in SDK use this..

Code:
Dim Variable as DocumentVariable
Dim Var as Variant

Set Variable = ThisDocument.DocumentVariables("Your Variable Name")
Var = Variable.Values(boUniqueValues)

MsgBox "Value Of The Variable : " & Var(1)

Hope you got some idea. Use that to do some If Then Else and take appropriate action.

Need more help, Drop a note.

Regards,
Sri
 
Hi,
Sridharan

thanks a ton,

hope you will also support me in future also.


rgs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top