Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Third party ActiveX to view office and PDF files in form
Message
From
18/11/2017 06:27:30
 
 
To
18/11/2017 04:16:21
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01655595
Message ID:
01655666
Views:
51
yes if you have an office converter to pdf its a good solution.i dont know if this tool is integrated on office after office 2007?
in office 2007 must download an add on.
i posted a relative code for office2007 but i cannot access to it in my posts here( must be a suscriber).

all is not lost ,this is the code:
*https://www.microsoft.com/en-us/download/details.aspx?id=7
*This download (934ko) allows you to export and save to the PDF and XPS formats in eight 2007 Microsoft Office programs.
*It also allows you to send as e-mail attachment in the PDF and XPS formats in a subset of these programs.
*install it as addon (office 2007 already installed).

&&tested on word2007 and add to download installed
Local loword
oWord=Createobject("WORD.application")
loDoc=oWord.documents.Open(Getfile('doc|docx')) &&test also for excel files...its same code

#Define wdFormatPDF 17
loDoc.SaveAs("d:\x.pdf",wdFormatPDF)   &&WdSaveFormat Enumeration
loDoc.Close()
oWord.Quit

&&view
Declare Integer ShellExecute In shell32.Dll ;
	INTEGER hndWin, String cAction, String cFileName, ;
	STRING cParams, String cDir, Integer nShowWin

ShellExecute(0,"open","d:\x.pdf","","",1)
Previous
Reply
Map
View

Click here to load this message in the networking platform