View Single Post
Old December 3rd, 2004, 02:46 AM
DorisTan DorisTan is offline
Registered User
Join Date: Nov 2004
Location: Singapore, Singapore, Singapore.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default saving picture from word to other folder

hi, i am using vb6 to create a program that read paragraph by paragraph form microsoft word, below is my coding:

Private Sub Command1_Click()
Dim wdApplication As Word.Application
Dim docWord As Word.document
Dim parCounter As Word.Paragraph
Dim wParas As Word.Paragraphs
Dim oShape As Object
Dim strPath As String

Set wdApplication = CreateObject("Word.Application")
Set docWord = wdApplication.Documents.Open("C:\GraphicTest.doc")
Set wParas = docWord.Paragraphs

For Each parCounter In wParas
If parCounter.Range.InlineShapes.Count > 0 Then
docWord.SaveAs "C:\entities.html", wdFormatHTML
strPath = docWord.FullName
List1.AddItem parCounter.Range.Text
End If
docWord.Close False
wdApplication.Quit wdDoNotSaveChanges
Set docWord = Nothing
End Sub

my question is why everytime when this program executes the SaveAs command, it will automatically save the pictures that i inserted in my GaphicTest.doc into another folder (automatically generated by this program.. and i have no idea how it generate) called entities_files. Actually my purpose is to save the pictures into a specified folder as .jpeg file, when i still trying to search for the command on how to doing it, this problem comes out.. can anybody please help me? Any idea? thanks.. :)