Solved

VB6, OLE Word Object - Saving

Posted on 2000-03-16
1
1,526 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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

771 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

9 Experts available now in Live!

Get 1:1 Help Now