Click here to Skip to main content
16,004,901 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: print, assign and logon Pin
Manik Nath27-Jun-05 23:29
Manik Nath27-Jun-05 23:29 
GeneralRe: print, assign and logon Pin
Christian Graus28-Jun-05 13:14
protectorChristian Graus28-Jun-05 13:14 
GeneralRe: print, assign and logon Pin
Manik Nath29-Jun-05 0:06
Manik Nath29-Jun-05 0:06 
GeneralRe: print, assign and logon Pin
Christian Graus29-Jun-05 11:28
protectorChristian Graus29-Jun-05 11:28 
GeneralError when showing report by Crystal Report Viewer Pin
tshung24-Jun-05 19:03
tshung24-Jun-05 19:03 
GeneralRe: Error when showing report by Crystal Report Viewer Pin
Madni Abbasi25-Jun-05 6:54
Madni Abbasi25-Jun-05 6:54 
QuestionHow to design Server (TCP/IP) only listen to a specific client Pin
NEOWT24-Jun-05 15:18
sussNEOWT24-Jun-05 15:18 
GeneralExporting Images from Word Pin
ironclads24-Jun-05 11:21
ironclads24-Jun-05 11:21 
Ok, I know what you are thinking. D'Oh! | :doh: Why was this posted on the VB.Net forum? Well, let me explain.

I Have a DHTML text editor that I currently import Microsoft Word documents into via IE. The only problem is only text comes across currently. I came across info on MSDN that said images can be saved out of Word 2003 as bmp files. So far I can open the document, get a handle on each image, and copy them to the clipboard, but for some odd reason, probably my fault Roll eyes | :rolleyes: , I can't seem to save them to the hard drive.

I've included the code below, perhaps you can assist, especially if you know MS VB.NET and VBScript better than I, which wouldn't be difficult to do. Wink | ;-) Basically I get the image copied to the clipboard fine but then I don't seem to be saving anything out. Nothing fails, it just doesn't save. Any help would be greatly appreciated. Wink | ;)

Sub ImportWordDoc()
On Error Resume Next
Set wApp = CreateObject("Word.Application")
wApp.Activate
wApp.WindowState=0
call wApp.Resize(400, 400)
Set wDoc = wApp.Documents.Open(document.all.FileToOpen.value)
wApp.Visible = true

For index = 1 To wDoc.InlineShapes.Count
inlineShape = ""
Set inlineShape = wApp.ActiveDocument.InlineShapes(index)
inlineShape.Select()
wApp.Selection.CopyAsPicture()
data = ""
Set data = Clipboard.GetDataObject()
If data.GetDataPresent( GetType( System.Drawing.Bitmap )) Then
bmp = ""
bmp = CType(data.GetData(GetType(System.Drawing.Image)), Bitmap)
bmp.Save( "C:\mybitmap" + cstr(index) + ".bmp" )
End If
Next
Call wDoc.Close(True)
call wApp.Quit(True)
End Sub
GeneralUninstall doesn't work Excel Addin Pin
btoyer24-Jun-05 10:48
btoyer24-Jun-05 10:48 
GeneralWierd Spy++ issue Pin
Abhishek Karnik24-Jun-05 10:18
Abhishek Karnik24-Jun-05 10:18 
GeneralRe: Wierd Spy++ issue Pin
Abhishek Karnik24-Jun-05 10:19
Abhishek Karnik24-Jun-05 10:19 
GeneralMultiple Selections at DesignTime Pin
SBendBuckeye24-Jun-05 9:24
SBendBuckeye24-Jun-05 9:24 
GeneralSolution compile problem Pin
mtone24-Jun-05 7:48
mtone24-Jun-05 7:48 
GeneralRe: Solution compile problem Pin
Dave Kreskowiak24-Jun-05 8:00
mveDave Kreskowiak24-Jun-05 8:00 
Question.NET or not ? Pin
dondo102024-Jun-05 7:24
dondo102024-Jun-05 7:24 
AnswerRe: .NET or not ? Pin
Dave Kreskowiak24-Jun-05 7:59
mveDave Kreskowiak24-Jun-05 7:59 
GeneralRe: .NET or not ? Pin
Steve Maier24-Jun-05 11:05
professionalSteve Maier24-Jun-05 11:05 
AnswerRe: .NET or not ? Pin
Het210927-Jun-05 1:30
Het210927-Jun-05 1:30 
GeneralAdd an element to an Array Pin
directred24-Jun-05 1:38
directred24-Jun-05 1:38 
GeneralRe: Add an element to an Array Pin
Member 188578024-Jun-05 2:40
Member 188578024-Jun-05 2:40 
GeneralRe: Add an element to an Array Pin
Dave Doknjas25-Jun-05 13:47
Dave Doknjas25-Jun-05 13:47 
GeneralOpening Outlook from Code Pin
Member 188578024-Jun-05 0:40
Member 188578024-Jun-05 0:40 
GeneralRe: Opening Outlook from Code Pin
Dave Kreskowiak24-Jun-05 1:49
mveDave Kreskowiak24-Jun-05 1:49 
Generalconversion from excel to pdf Pin
Member 199825024-Jun-05 0:35
Member 199825024-Jun-05 0:35 
GeneralRe: conversion from excel to pdf Pin
Dave Kreskowiak24-Jun-05 1:48
mveDave Kreskowiak24-Jun-05 1:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.