![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
![]() This Publisher code is annoying to debug. Try this one (again, after selecting the frame where the name should sit). It works for me and appears a bit more robust. Code:
Sub TestExport() Dim sName As String, sPath As String, aRng As TextRange Set aRng = Selection.ShapeRange(1).TextFrame.TextRange With ActiveDocument.MailMerge.DataSource .ActiveRecord = 1 Do sName = .DataFields.Item("Name").Value aRng.Text = sName 'sPath = ActiveDocument.Path & "\" & .DataFields.Item("JpgFileName").Value sPath = .DataFields.Item("JpgFolderPath").Value & "\" & .DataFields.Item("JpgFileName").Value ActiveDocument.Pages(1).SaveAsPicture Filename:=sPath, pbResolution:=pbPictureResolutionWeb_96dpi If .ActiveRecord = .RecordCount Then Exit Do .ActiveRecord = .ActiveRecord + 1 Loop End With End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#2
|
|||
|
|||
![]()
Thank you Andrew you just made it to the top of the list of my favourite people
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need to create an office (word) add-in to create a custom ribbon bar with icons | avogt | Word VBA | 1 | 05-18-2018 06:06 AM |
Custom table in custom Word 2010 template | Hans L | Word Tables | 5 | 04-17-2018 08:42 AM |
Create Custom Month | Cfwoodbury | Outlook | 0 | 02-11-2015 09:55 AM |
![]() |
srobbins | Word | 3 | 06-17-2012 03:22 AM |
![]() |
mosrozen | Word VBA | 2 | 06-14-2012 06:59 AM |