Solved

View Doc or Docx files in a vfp form

Posted on 2016-09-23
4
35 Views
Last Modified: 2016-10-04
Is there a way to see the entire contents of a word file (doc or docx) inside a visual foxpro form?
0
Comment
Question by:Peter H.
  • 3
4 Comments
 
LVL 17

Assisted Solution

by:xtermie
xtermie earned 500 total points
Comment Utility
0
 

Author Comment

by:Peter H.
Comment Utility
The other solution would be to convert DOC files to a pdf.  I have a client that still uses word 2003 and has a number of files in that format.  If they had word 2007 I could use automation to save the document as a pdf and view it that way without issue.  As for your link xtermie it points me to an activex solution that costs 1000s,
0
 

Accepted Solution

by:
Peter H. earned 0 total points
Comment Utility
What I ended up doing is using my client's word 2003 (ugh) to convert to DOCX but the enumerations were different then the current word version (2007 and above) and used saveas with filetype 13 to save as docx.  From there, I wrote myself a conversion from docx to pdf using some telerik libraries and called those libraries using wwDotNetBridge ( http://west-wind.com/wwdotnetbridge.aspx ) so I wouldn't have to register the DLLs.
From there I used an "Shell.Explorer.2" olecontrol on my VFP form to display the pdf document.  Works like a charm but the client needs a pdf viewer (tried adobe and foxit which worked perfectly) and one pdf viewer needs to be set as a default otherwise you get an annoying "set it as default" message.
Using 3rd part tools was way too expensive.
0
 

Author Closing Comment

by:Peter H.
Comment Utility
Solved the problem
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now