Solved

VB6, OLE Word Object - Saving

Posted on 2000-03-16
1
1,539 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

919 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now