Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have used the following code to select a particular date. The issue here is, I am using a loop and export different selections for the same date, but if there is no date (i.e., the date which i have mentioned in my code "13") for a particular selection, it automatically exports all the date's data. Is there any solution for this.
ActiveDocument.GetField("My Calendar field").Select "13"
Thanks in advance.
It's difficult to give a precise answer when I can see only a single line of code. I'm thinking that if the date doesn't exist, then nothing gets selected.
Maybe something like:
ActiveDocument.GetField("My Calendar field").Select "13"
set val=ActiveDocument.Fields("My Calendar field").GetSelectedValues
if val.Count >0 then
<Your code to export here>
end if
I did not get the answer yet, please let me know if my question is not clear
It's difficult to give a precise answer when I can see only a single line of code. I'm thinking that if the date doesn't exist, then nothing gets selected.
Maybe something like:
ActiveDocument.GetField("My Calendar field").Select "13"
set val=ActiveDocument.Fields("My Calendar field").GetSelectedValues
if val.Count >0 then
<Your code to export here>
end if