Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

View Doc or Docx files in a vfp form

Posted on 2016-09-23
4
Medium Priority
?
208 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 18

Assisted Solution

by:xtermie
xtermie earned 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
Quickbooks hosting can do wonders to your enterprise but considering the points elaborated in the article which will help you to better analyze the outcomes. So scan your business, its needs and then move to the new world of limitless benefits.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

971 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