how to view word file in navision.

kgsinha
Member Posts: 67
Dear All,
I have used Blob datatype field to save word file in navision.
File is being saved. It is ok
Now i want to view the word file (which is saved in navision).
So is it possible to direcly view the word file from navision???
Pls help
I have used Blob datatype field to save word file in navision.
File is being saved. It is ok
Now i want to view the word file (which is saved in navision).
So is it possible to direcly view the word file from navision???
Pls help
0
Comments
-
Look into table 5062 Attachment. This contains a function OpenAttachment which also runs Word if the blob-field contains a Word-file.0
-
I am not sure how and where you are trying to do this, but something like this should work :
==============================
CREATE(WordApp);
WordApp.Visible(TRUE);
FileName := 'Path to the file';
WordDoc := WordApp.Documents.Open(FileName);
WordDoc := WordApp.ActiveDocument;
WordApp.PrintOut(); // If you want to print it directly after
===============================
Good luck
Steeve Le Provost
http://www.steeve-leprovost.fr.cxSteeve Le Provost
http://www.steeve-leprovost.fr.cx0 -
Hi all,
I have the same problem.
I want to create one command button 'Open File'.
When I click on that it should display the attachment directly without exporting it to hdd.
Can i do the same? if yes then how? I dont have the file path. i have only File name, file size, file data, content type. It can have any type of file.
Please help me out.0 -
sorry, this works only with exporting.
So on export of the blob you can store the BLOB in environ('Temp') + '\' + YourFilename + '.' + FilenameExtension.
To know the File Extension you can save this extension in a separate field when you import the file.
For example:FileDialog.DialogTitle := 'FilePath...'; FileDialog.Filter := ''; FileDialog.InitDir('C:\'); FileDialog.Filter('All (*.*)|*.*'); FileDialog.ShowOpen(); FileDialog.CancelError(FALSE); IF (FileDialog.FileName <> '') THEN BEGIN "Document Template".IMPORT(FileDialog.FileName,FALSE); i := STRLEN(FileDialog.FileName); WHILE FileDialog.FileName[i] <> '.' DO i -= 1; "File Extension" := COPYSTR(FileDialog.FileName,i,STRLEN(FileDialog.FileName)-i+1); y := i; WHILE FileDialog.FileName[i] <> '\' DO i -= 1; Description := COPYSTR(FileDialog.FileName,i+1,y-i-1); CurrForm.SAVERECORD; END;
RegardsDo you make it right, it works too!0 -
Hi all,
Thanks for your replies.
Recentaly I found one forum
viewtopic.php?f=23&t=3344
which solved my problem and the exact requirement.
Thanks to all.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions