URGENT HELP PLEASE PLEASE PLEASE??? 
Author Message
 URGENT HELP PLEASE PLEASE PLEASE???

i would like to write  then run a macro in a word mail merge document
that will recognise a line of text and then change this text to a bitmap
picture which is stored in an other location .

eg
     text could read         aa
                       or          ab
                       or          ac
and so on down to         az

bit map files could be on my c: drive

with diff names ie         aa.bmp
                                  ab.bmp and so on

so that when i run the macro it will replace the text aa with a bitmap
picture aa.bmp

help please as ive been trying for 6 months with no success




Tue, 01 Jul 2003 17:53:57 GMT  
 URGENT HELP PLEASE PLEASE PLEASE???
Hi Ian
try the following. It works for the actual paragraph with only the 'name'
at the beginning ...

hth, Martin

'---
  Dim sName As String, sPath As String, sExt As String

  sExt = ".gif"
  sPath = "c:\"
  sName = Selection.Paragraphs(1).Range.Text
  sName = Left(sName, Len(sName) - 1)

  ChangeFileOpenDirectory sPath

  If UCase(Dir(sName & sExt)) = UCase(sName & sExt) Then
      Selection.Paragraphs(1).Range.Delete
      Selection.InlineShapes.AddPicture FileName:=sPath & sName & sExt _
          , LinkToFile:=False, SaveWithDocument:=True
  End If
'---


says...

Quote:
> i would like to write  then run a macro in a word mail merge document
> that will recognise a line of text and then change this text to a bitmap
> picture which is stored in an other location .

> eg
>      text could read         aa
>                        or          ab
>                        or          ac
> and so on down to         az

> bit map files could be on my c: drive

> with diff names ie         aa.bmp
>                                   ab.bmp and so on

> so that when i run the macro it will replace the text aa with a bitmap
> picture aa.bmp

> help please as ive been trying for 6 months with no success



--
Martin S?gesser



Tue, 01 Jul 2003 23:41:33 GMT  
 URGENT HELP PLEASE PLEASE PLEASE???
Hi Ian,

The best thing to do is store the path to the bitmap in a field in the data
source and then insert that mergefield inside an { INCLUDEPICTURE } field in
the mailmerge main document in place of the filename that you would normally
have in such a field.

Then when you execute the mailmerge, and select the whole document and press
F9 to update all of the fields in the output, the respective bitmaps will
appear along with the other data for each record.

BTW, it's best to put the subject of your question as the Subject of your
post.

Please post any follow-up or new questions to the Newsgroups so that others
may benefit therefrom or contribute thereto.

Hope this helps,
Doug Robbins - Word MVP

Quote:
> i would like to write  then run a macro in a word mail merge document
> that will recognise a line of text and then change this text to a bitmap
> picture which is stored in an other location .

> eg
>      text could read         aa
>                        or          ab
>                        or          ac
> and so on down to         az

> bit map files could be on my c: drive

> with diff names ie         aa.bmp
>                                   ab.bmp and so on

> so that when i run the macro it will replace the text aa with a bitmap
> picture aa.bmp

> help please as ive been trying for 6 months with no success





Wed, 02 Jul 2003 20:28:12 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

2. Can anyone HELP me PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE

3. urgent please i beg please i beg please i beg

4. PLEASE HELP PLEASE HELP PLEASE HELP

5. An Urgent Question Please , Please help me

6. Design Help PLEASE PLEASE PLEASE!

7. Please Please PLEASE HELP!!!!!

8. Please please please, help me :-)

9. Please, Please, Please I need help working with dates

10. Please, please, please help!!

11. Cloning problem -- please please please help

12. Please, please, please, help!

 

 
Powered by phpBB® Forum Software