Hi, I need to export multiple pages in PNG in one process keeping the same name of the page. I need help...
You're going to need to add a suffix of some sort (eg _1 for page 1, _2 for page 2 etc. You cannot have several files all with the same name.
Or save the files to different folders, but that would probably be clumsy.
A macro would be able to do this, if you have a full retail copy (ie, not home and student or other special version that doesn't have VBA).
All the pages have different names. I did a macro but I dont have the option to keep the pages names. It is a way to do this?
You can try this code (created and teste in X5)
Sub PNG_Export()Dim pW As Double, pH As Double, ea As Rect, p As Page, sp As String, Filter As ExportFilter For Each p In ActiveDocument.Pages p.Activate pW = ActivePage.SizeWidth pH = ActivePage.SizeHeight Set ea = CreateRect(ActivePage.LeftX, ActivePage.BottomY, pW, pH) sp = "e:\" + ActiveDocument.Name + "." + ActiveDocument.ActivePage.Name Rem Path where exported files will be saved - eg. e:\filename.pagename.png
Set Filter = ActiveDocument.ExportBitmap(sp + ".png", cdrPNG, cdrCurrentPage, cdrRGBColorImage, , , 150, 150, Transparent:=True, ExportArea:=ea) Filter.Finish Next pEnd Sub
Best regards
Mek
Thank you very much!, I´ll try it.