Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load a File into an "Insertable Object" ?

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
Hello
This question is another twist on my project mentioned in another of my posts below.I am trying to figure out if there is an easy way to load an MS Word file into an object -don't want to open it into Word or Word Viewer as I need to make sure the opened file is read only.
so... here is my code when I double click the file name it opens into some type of object

Private Sub fileABC_DblClick()
'allows double click on filename to load the file
Dim SelectedFile
SelectedFile = fileABC.Path & "\" & fileABC.FileName
rtfText.LoadFile (SelectedFile)
End Sub

currently, rtfText is a RichText object - I have converted my Word doc into RTF, but I really don't want to do that.I have been trying to use this code to load the file into an MS Word "insertable Object" that I can add to my object palett - but whatever I put after the dot doesn't work - there is no .LoadFile option that I can use.

Anyone out there have any other suggestions? Please see my post below "launch a Locked App Within Program" for more info.

Thanks for helping a musician and "tinkering programmer"
 
If you're loading an RTF file, then why not just use the RTF Control? If I recall correctly, it has much of the functionality that you're asking for. Plus you can choose to let the user save or not. An advantage of this approach is that you don't have to have MS-Office installed on any machine you install your app on.

Just a thought. Snaggs
tribesaddict@swbell.net
 
Snaggs -

I did originally use the RTF control and it works great, but in the process of converting the documents to RTF from their original format of MS Word, they lost some of their formatting - which I really would like to preserve. That's why ideally I want to load a "snapshot" of the word file. Then all the users can do is see if it's the one they want and print it - in perfect formatting,etc.. BTW, all my users will have Word, so that's not a concern.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top