Solved

View Doc or Docx files in a vfp form

Posted on 2016-09-23
4
72 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.
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 18

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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 simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

763 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