Solved

View Doc or Docx files in a vfp form

Posted on 2016-09-23
4
47 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
ID: 41813615
0
 

Author Comment

by:Peter H.
ID: 41816249
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
ID: 41822047
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.
ID: 41827732
Solved the problem
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

911 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