Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Fri, 4 Jul 2008 16:02:00 -0700,    group: microsoft.public.word.vba.general        back       


Insert Photo & Photo Name   
How do I include the name of a photo inserted into a work doc without typing 
it in each time?

ie..  Photo 034.jpg
date: Fri, 4 Jul 2008 16:02:00 -0700   author:   Keith

Re: Insert Photo & Photo Name   
Running the following macro will allow you to select the picture that you 
want to insert, then it inserts the picture and the name of the file after 
the picture in a paragraph that is center aligned:

    Dim txtPhotoPath as String
    With Dialogs(wdDialogInsertPicture)
        If .Show Then
            txtPhotoPath = WordBasic.FilenameInfo$(.Name, 0)
        End If
        Selection.InsertAfter vbCr & txtPhotoPath
        Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
    End With


-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Keith"  wrote in message 
news:16D5BB2D-D9D2-468E-A24F-1EB7C43C81DC@microsoft.com...
> How do I include the name of a photo inserted into a work doc without 
> typing
> it in each time?
>
> ie..  Photo 034.jpg
date: Sat, 5 Jul 2008 10:43:31 +1000   author:   Doug Robbins - Word MVP

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us