hcl-bot
January 21, 2008, 11:10am
1
Hello everybody,
I try to create a command button to open and display a pdf file which is contained in a richtextitem. I don’t now how to proceed. I have tried to use the Open statement in Lotusscript after save my document on the computer :
Dim fileNum As Integer
fileNum% = Freefile()
Open “c:\test.pdf” For Input As fileNum%
But this solution don’t works.
So I need your help.
Thank you.
Best regards
hcl-bot
January 21, 2008, 11:49am
2
Subject: Open and display a pdf file contained in a richtextitem
Add a field $$HTMLHead and use this as the formula:
path := @ReplaceSubstring (@Subset (@DbName ; -1); “\”; “/”);
file := @ReplaceSubstring (@Subset (@AttachmentNames ; 1); " "; “+”);
@If (@Attachments ;
“<META HTTP-EQUIV="refresh" CONTENT="0;URL=/” + path + “/0/” + @Text (@DocumentUniqueID ) + “/$file/” + file + “">”
;“”)
It works in the client and the browser.
Make sure you only have a single file attached.
This code is smart enough to launch the file using the appropriate application based on the users pc setup (ie registry).
I think that works…it does in one of my dbs.
HTH
Doug
ps - code not mine but stolen from elsewhere in the forum.
Subject: RE: Open and display a pdf file contained in a richtextitem
Thank you very much Doug.It works very well ^^
Best regards.