Solved

VB6, OLE Word Object - Saving

Posted on 2000-03-16
1
1,548 Views
Last Modified: 2007-10-18
I'm using the following code to save my embedded OLE word object...
-------------------
   iFile = FreeFile
   Open App.Path & "\" & myDOTFile For Binary As iFile
   myOLEObject.FileNumber = iFile
   myOLEObject.SaveToFile iFile
-------------------
The above logic does NOT save back to MSWord format.  Is there anyway to bring a Word document into an OLE container, modify within the OLE container, and save back into Word format?
0
Comment
Question by:prosoftsolutionsinc
1 Comment
 

Accepted Solution

by:
john_price earned 100 total points
ID: 2732214
Hi, guy.  Instead of doing the save to a file, try

myOLEObject.Object.SaveAs "App.Path & "\" & myDOTFile "

where myDOTFile is something like "myDoc.Doc"



The reason is that since the "Object" property of the OLE control is of type Document, it supports the methods of that object.  You don't see them in the popup because of late binding of the object.

-- John

0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

772 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