Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-28-2012, 02:14 AM
macropod's Avatar
macropod macropod is offline Displaying pictures from a field with a file path Windows 7 64bit Displaying pictures from a field with a file path Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,512
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi okiegirl,

Some comments:
1. Mergefields are really only for use in a mailmerge, where they get data directly from a mailmerge datasource.
2. The syntax for a mergefield embedded in an INCLUDEPICTURE field would be either:
{INCLUDEPICTURE "{MERGEFIELD Photo1}.jpg" \d}
if the mergefield includes the path (which needs to includes double backslashes as the separators, or:
{INCLUDEPICTURE "C:\\Users\\FilePath\\{MERGEFIELD\"Photo1\"}.j pg" \d}
if the mergefield does not include the path.
3. If you're trying to insert the picture with a link via vba, you would need to have 'LinkToFile:=True'. Fields aren't required for this.


4. I note you're now using a Selection as the destination for the inserted picture. If you use a range object (eg pointing to a bookmark or a cell in a specified table), you don't need to select it beforehand. Furthermore, if the table cell has fixed dimensions, the inserted picture will automatically be constrained to fit the cell's size, maintaining the correct aspect ratio. In that case, you wouldn't need to code for sizing the shape.
5. The way you're using the 'Picture' bookmark doesn't allow for the picture to be changed. Any attempt to update it will result in multiple pictures.

PS: When posting code, please use code tags (on the 'Go Advanced' tab).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
mail merge problem, pictures



Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying pictures from a field with a file path File Path for Outlook 2007 pst eliz.bell Outlook 2 10-29-2011 07:04 PM
Displaying contact pictures in e-mail header christer Office 0 10-03-2011 09:40 AM
Modify default template to include file path jacl Excel 1 03-26-2011 10:24 AM
Show Full File Path in Title Bar paulj Excel 3 02-10-2010 07:18 AM
Displaying pictures from a field with a file path get file name without Path Ziggy1 Word VBA 1 09-29-2006 07:55 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:04 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft