I have an button on a view that exports the data from a document to an excel file. The problem is that I wish to export it to the My documents folder of the person logged onto the machine. I am using formula language but I do not do the code. I am not restricted to using Formula code so if it can be done in Lotus script that would be great. Any help on this would be greatly appreciated.
Here is the code I have so far,
@Prompt([Ok];“Export”;“The selected data will be exported to a file called Mailing.xls into your My Documents Folder. You can then use the spreadsheet data to perform the Mail Merge.”);
@Command([FileExport];“Tabular Text”;“C:\Documents and Settings\%Userprofile%\Desktop\Mailing.xls”);
@PostedCommand( [Execute]; “C:\Program Files\Microsoft Office\Office11\EXCEL.EXE”;“C:\Documents and Settings\%Userprofile%\Desktop\Mailing.xls”)
I the %Userprofile% is the section of code I need the help on . If I put in All Users it works fine and the file is created in the All users My Documents but it has to be created in the profile of the user logged onto the machine.
Subject: RE: How to file export to a specifc NT User Profile
Hi there,
Thank you for your suggestion. I have tried your suggestion but it does not seem to work for me.
I presume from looking on the internet that the USERPROFILE would have to be declared in the notes.ini file on the local machine which it is not. However we have a declaration for FileDlgDirectory that points to the specific users Desktop. So we could use this Variable. I tried this but it also will not work .
I put in some code as follows:
@Prompt([Ok];“Export”;“The selected data will be exported to a file called Mailing.xls on your desktop. You can then use the spreadsheet data to perform the Mail Merge.”);
It seems like the code is working and it does to an extent except that the Mailing.xls file gets saved to the root of the domino server. We definitely don’t want that.
Subject: RE: How to file export to a specifc NT User Profile
Hi Shaw,
Thank you for your suggestion. I tried both your options and for both I just get File Could Not be Created Error.
I dont think I pointed out earlier on that this code is in an action button in a view. I select the documents and then choose to do the export.
I really cannot see what I am doing wrong. Could you please help me again.
Here is my code on the button:
@Prompt([Ok];“Export”;“The selected data will be exported to a file called Mailing.xls on your desktop. You can then use the spreadsheet data to perform the Mail Merge.”);