Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VB6, OLE Word Object - Saving

Posted on 2000-03-16
1
Medium Priority
?
1,689 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 400 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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

810 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