Posted: Wed Oct 13, 2004 1:33 pm Post subject: How to save inserted object on disc?
Hi,
I am looking for a simple way in VB to get and save on local disc the content
of all inserted objects in a ms word document.
I'm using ms word 2002 sp-2.
I would be grateful for any help
Thank you
Posted: Mon Oct 18, 2004 5:08 am Post subject: Re: How to save inserted object on disc?
For Word and Excel inserted objects I do something like the code below.
But what to do with other types of objects like PDF, TXT ?
Is there a way to be generic?
Dim ishape, myObj, pjClassType, tempDoc, o, obj
Dim tempFiles As New Collection
For Each ishape In ActiveDocument.InlineShapes
If ishape.OLEFormat.DisplayAsIcon Then
tempFile = tempFolder & "\pj_word_" & CStr(i)
pjClassType = ishape.OLEFormat.ClassType
If pjClassType = "Excel.Sheet.8" Then
tempFile = tempFile & ".xls"
ishape.OLEFormat.Open
Set myObj = ishape.OLEFormat.Object
myObj.SaveAs (tempFile)
tempFiles.Add (tempFile)
myObj.Application.Quit
Set myObj = Nothing
ElseIf pjClassType = "Word.Document.8" Then
tempFile = tempFile & ".doc"
Set tempDoc = ishape.OLEFormat.Object
tempDoc.SaveAs (tempFile)
tempFiles.Add (tempFile)
Set tempDoc = Nothing
End If
i = i + 1
End If
Next ishape
Object within an Object Hello, I hope this is the right group to post to. I'm trying to have a VB6 application create an (Office10) object through late binding which opens an MDE database. The Access code will then create an (
VB6 Object References I’m creating an application that will report dependency information for a given Visual Basic Project. The application simply reads the .vbp file, obtains the GUIDs, and looks to for confirmation that the resource has been registered. Th
OLE Object Control I want to know that where i could get the OLE control in VB.net.if any one knows please guid me. bye bye Damodar
shockwave object without oledrag Hi,I'm trying to find a way to give to a shockwave obj the oledrag and drop methods. Up to now I have worked around it putting a picture that when the form it's out of focus it just cover it.The only drawbacks are that you can drag a file without losing f
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum