|
-
Feb 18th, 2000, 08:39 AM
#1
Thread Starter
Member
I'm using VB6 to automate creating a word document based on data that a user enters into a form that is stored into an Access 97 database.
I can get the text from the database fields and replace them in the word document but I can't figure out how to "cut and paste" an OLE object.
I have an OLE object field in access that stores a Word or Excel document (embedded) that the user updates. I want to copy that ole object and insert it into the final Word doc that I am creating programatically.
I can do this by manually copying and pasting from Access to Word.
Thanks.
[This message has been edited by JasonS (edited 02-21-2000).]
-
Feb 21st, 2000, 08:24 AM
#2
-
Feb 21st, 2000, 12:02 PM
#3
Thread Starter
Member
This is the code I'm using to insert the text fields into the word document:
With ObjWord.Selection.Find
.Text = Header
.Execute Forward:=True
End With
'.ClearFormatting
Clipboard.Clear
Clipboard.SetText (Data)
ObjWord.Selection.Paste
Clipboard.Clear
Anyone have any ideas for the OLE object?
-
Feb 22nd, 2000, 01:36 AM
#4
Thread Starter
Member
I had already looked at the word browser objects and everthing that I've found has a reference to a filename. For instance the .inlineshapes.addoleobject function allows you to enter the class name if you want to create a new doc or a filename if you want to link or embed the file.
My file is already embedded in the Access table so this reference won't work. I get errors if I try to use that function.
-
Feb 24th, 2000, 08:06 AM
#5
Addicted Member
ummm, you're right, well, i'll look further myself.. meanwhile lets wait if anyone has a better answer..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|