Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Sep 25, 2018 5:20 pm

hi,

im using the free version spire.doc, latest current version.
trying the sample code to convert word document to an image fails on loading the document also saving part.
the loadfromfile part fixed it by changing from

'Dim document_Renamed As New Document()
'document_Renamed.LoadFromFile("C:\VBDashboard\Data\FindAndReplace.docx")

to this

Dim oWord As Word.Application
Dim document_Renamed As Word.Document
oWord = CreateObject("Word.Application")
oWord.Visible = True
document_Renamed = oWord.Documents.Add("C:\VBDashboard\Data\FindAndReplace.docx")

but i am stuck at savetoimage part which throws an exception error below:

'Save doc file.
Dim img As Image = document_Renamed.SaveToImages(0, ImageType.Bitmap) 'below error is thrown here
img.Save("sample.bmp")


System.MissingMemberException: 'Public member 'SaveToImages' on type 'DocumentClass' not found.'

please help

Orik999
 
Posts: 2
Joined: Mon Sep 24, 2018 4:31 pm

Wed Sep 26, 2018 9:18 am

Hello,

Thanks for your inquiry.
After an initial test with below sample code, I didn't reproduce your issue. I suggest upgrading to our latest commercial Spire.Doc Pack(hot fix) Version:6.9.11 to try again. If you still encounter a problem when loading the word file, please provide your FindAndReplace.docx to help us further investigate your issue. You could send it to us via email(support@e-iceblue.com).
Code: Select all
Dim document_Renamed As New Document()
document_Renamed.LoadFromFile("test.docx", Spire.Doc.FileFormat.Auto)
Dim img As Image = document_Renamed.SaveToImages(0, ImageType.Bitmap)
img.Save("sample.bmp")

Sincerely,
Lisa
E-iceblue
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Sat Sep 29, 2018 6:49 am

Hello,

Greetings from E-iceblue.
Could you let us know how is your issue going? Thanks in advance for your valuable feedback and time.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Fri Oct 26, 2018 4:31 pm

hello.
thank you for all your help. i stopped using spire.doc as i couldn't make it work.
many thanks

Orik999
 
Posts: 2
Joined: Mon Sep 24, 2018 4:31 pm

Mon Oct 29, 2018 1:20 am

Hello,

Thanks for your reply.
I'm afraid it is hard to provide an accurate solution without your input word document. Please send it to us via email (lisa.li@e-iceblue.com). You could remove the confidential data of your document, just make sure the modified file can reproduce your issue. And don't worry, we promise to keep your resources confidential and won't use them for other purpose.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.Doc