Topic: A print preview or "Document preview" window from selected record

Hello MVD fans and pros,

Is there a way to show a document preview on a form, say for example if you select a record from a table grid, display this record in a form and show a document you had attached related to this record - i.e. Word document, Excel document?  Can someone show me a script for this or an example of how this can be accomplished, or if this is even possible with MVD?  Thanks in advance.

Re: A print preview or "Document preview" window from selected record

Hi There,
If I understand you correctly, then yes, it's possible.
Please have a look at the attached.
There is a bit more to the script than is necessary to cover your question but it addresses a couple of extra scenarios.
Using the example in the attachment
1.  When a student record is created, a .txt file gets automatically created (using the student's name as the file name).
2.  The contents of the .txt file are displayed within a memo field on Form 2.
3.  The contents of the .txt file can be edited within MVD and the changes written back to the .txt file.
4.  The contents. of the .txt file can, as usual, still be edited outside of MVD.
Please note that memo fields only support .txt files so if you want to preview anything else (ie with formatting, with pictures etc), then the better option is to make external calls (ie the call is made from within MVD but you preview it outside of MVD).
Hope this helps,
Derek.

Post's attachments

Attachment icon gonpublic externalfiles.zip 340.48 kb, 433 downloads since 2018-05-30 

Re: A print preview or "Document preview" window from selected record

As always, thanks so much Derek this helps me a lot to figure out how to save and edit notes.  Much appreciated!