/ Forums / Advansys Formativ / Creating Solutions with Formativ / ExpandedRecipients / Reply To: ExpandedRecipients
quote:
Originally posted by Immi:
If the workFolder is in a subfolder, then it fails. How can I build a complete folder-path for ‘groupwise.ItemSaveMessageDraft(iWIPPath)’ ?
The following recursive function will return the full path of the Work-In-Progress folder.
Sub Main(Client, GWEvent)
dim iWIPFolderPath
‘ Account refresh required if you have moved the WIP folder in current session.
groupwise.account.refresh
call GetWIPFolderPath(groupwise.account.workfolder, iWIPFolderPath)
msgbox iWIPFolderPath
End Sub
‘ Get full path of the Work-In-Progress folder
function GetWIPFolderPath(aGWFolder, byref aPath)
if aGWFolder is nothing then
exit function
end if
if (aPath <> “”) then
aPath = aGWFolder.name & “” & aPath
else
aPath = aGWFolder.name
end if
if (aGWFolder.objtype = fgwRoot) then
exit function
else
call GetWIPFolderPath(aGWFolder.ParentFolder, aPath)
end if
end function
Thanks
MA