Excel all vlookup values should print as image instead of pdf

phanibh9

New Member
Joined
Sep 14, 2016
Messages
1
Hi,

In excel by using lookup functionality we are generating some records in a table by selecting the table or print area using macro auto script i am printing them as pdf's in my computer harddisk, but my requirement is to print as image instead of pdf. I am okay with any format of image preferably jpeg or png. Here is my script please help me with the code which generate images and auto save in my computer particular folder.

Sheet Name: Data
[TABLE="width: 384"]
<colgroup><col width="64" span="6" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]S.No[/TD]
[TD="class: xl65, width: 64"]id[/TD]
[TD="class: xl65, width: 64"]name[/TD]
[TD="class: xl65, width: 64"]website[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]ABC[/TD]
[TD]Good MBA Colleges[/TD]
[TD]Top[/TD]
[TD]Test1[/TD]
[TD="align: right"]480000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]ABC[/TD]
[TD="class: xl66"]MBA Colleges[/TD]
[TD]Best[/TD]
[TD]Test2[/TD]
[TD="align: right"]480000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]ABC[/TD]
[TD]Top Colleges[/TD]
[TD]Top[/TD]
[TD]Test3[/TD]
[TD="align: right"]480000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]ABC[/TD]
[TD]Required colleges[/TD]
[TD]Top[/TD]
[TD]Test4[/TD]
[TD="align: right"]480000[/TD]
[/TR]
</tbody>[/TABLE]
Sheet Name: Report

[TABLE="width: 474"]
<colgroup><col span="3"><col><col span="2"></colgroup><tbody>[TR]
[TD]Lookup Table:[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Service[/TD]
[TD]ABC[/TD]
[TD]Dicounted Colleges[/TD]
[TD]Inputs[/TD]
[TD]Scholarship[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]ABC[/TD]
[TD]Good MBA Colleges[/TD]
[TD]Top[/TD]
[TD]Test1[/TD]
[TD="align: right"]480000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]ABC[/TD]
[TD]Top Colleges[/TD]
[TD]Best[/TD]
[TD]Test2[/TD]
[TD="align: right"]480000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]ABC[/TD]
[TD]Top Colleges[/TD]
[TD]Top[/TD]
[TD]Test3[/TD]
[TD="align: right"]480000[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]ABC[/TD]
[TD]Required colleges[/TD]
[TD]Top[/TD]
[TD]Test4[/TD]
[TD="align: right"]480000[/TD]
[/TR]
</tbody>[/TABLE]

Requirement: Print this table as image instead of pdf by using macro script

Script for printing as pdf
Code:
Sub PrintAll()
RowCount = Worksheets("Data").Cells(Rows.Count, 1).End(xlUp).Row - 15
Worksheets("Report").Select
For i = 1 To RowCount
Range("B1").Value = i
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:="D:\CoursesMBA LOCAL\Ideas Vendors Business\Excel Worksheet\Test FOlder33" & Range("B1").Value & ".pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Next i
End Sub
Please help me with script which generate images and auto save in local hard-disk.
 
Last edited by a moderator:

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,223,997
Messages
6,175,874
Members
452,679
Latest member
darryl47nopra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top