Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 13th, 2004, 09:58 AM
Registered User
 
Join Date: Jul 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default How can I invoke an .rtf file with VB?

When I click on a .rtf file in a directory, Microsoft Word opens with the .rtf contents. Is there a way that I can insert a command into a VB program that will cause that .rtf file to open up in Microsoft Word?

 
Old February 13th, 2004, 10:04 AM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Do you wish just to open it in Word? This could be done with a shell command. Otherwise, if you want to process it you can do so by referencing the Word Application library and open ing it through there.
 
Old February 13th, 2004, 10:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 231
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use ShellExecute to open a file using the default program associated with that file type. Check out VB Accelerator for more details.

Regards
Owain Williams
 
Old February 13th, 2004, 11:56 AM
Registered User
 
Join Date: Jul 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Cool! I tried the accelerator example.
Thanks guys!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Display RTF data in crystal report 8.5 using VB shahvismay76 Crystal Reports 1 May 16th, 2013 07:37 AM
Reading an RTF File apoorva_ca C# 2005 1 January 10th, 2008 11:34 AM
Cannot invoke getName() on the array type File[] fuadlutfi85 JSP Basics 1 July 13th, 2007 03:43 AM
Created RTF when try to open RTF, got an error not24 C# 0 March 31st, 2006 01:31 PM
Page breaks in rtf File bvprasad XSLT 0 January 19th, 2004 02:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.