Link to home
Start Free TrialLog in
Avatar of David Schmalzer
David SchmalzerFlag for United States of America

asked on

File Selection and embedding

I would like to create a button or whatever to bring up a specific directory so I can select a Word document.  Once selected I would like it to be embedded into a RTF.  How?
Avatar of HemanthaKumar
HemanthaKumar

There is an API call which accomplishes your task, check this link

http://www.keysolutions.com/NotesFAQ/howwin32.html

~Hemanth
Avatar of David Schmalzer

ASKER

I'm not too familiar with script.  Where exactly do I put the code and what do I change to tailor it to my needs,  if I need to.  I've tried the LOCALBROWSE formula before but that only gives back the path.  I need it to actually embed it once it is selected.  thanks.
I will give you a working copy of it for you, but at a price !

Need this question to be heavy for others to get it, as this is a universally acceptable solution.

i.e. More points in straight way.

What do you say ?

I only have 24 left. Oh well.
Hello schmad01,

are your user LotusNotes clients R5?
Client 4.6.7
Create a button on your form where you want to embed your Word document.
In my button formula is the name of the RTF field: "Body"
Here the button formula:
FileName:=@Prompt([LOCALBROWSE];"Select the Word file";"Please select the Word document";"";"";3);
@If(@Contains(@UpperCase(FileName);".DOC");"";@Do(@Prompt([OK];"No Word documet";"No Word documet selected");@Return("")));
@Command([EditGotoField];"Body");
@Command( [EditInsertFileAttachment];FileName;"1")

Regards,
zvonko
I only have 24 left. Oh well.
This good, getting closer.  Is it possible to have the document displayed in the field instead of the icon?  and is it possible to have the LOCALBROWSE default to a specific directory?  
ASKER CERTIFIED SOLUTION
Avatar of zvonko
zvonko

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This good, getting closer.  Is it possible to have the document displayed in the field instead of the icon?  and is it possible to have the LOCALBROWSE default to a specific directory?  
Thanks alot ZVONKO.
thank you, for the points and for the feedback :-)
Hello schmad01,

is this question closed from your point of view, or have you solved the last questions on your own?
I mean, specific directory is not possible for [LOCALBROWSE], but pasting of WindowsMetaFormat (or RichTextFormat) is possible, but extremply difficult and errornous...