Solved

VB6, OLE Word Object - Saving

Posted on 2000-03-16
1
1,576 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

749 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