Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / August 2005

Tip: Looking for answers? Try searching our database.

Clear Bookmark Content (Image)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
teddy b - 26 Aug 2005 03:21 GMT
Hope some one can help.

I have a userForm with 3 options. My logo will call out from excel file base
on my selection. I encounter the problem when i reselect the option. The logo
will overlap the old 1.

How to clear the old logo and place the new 1?

Thanks.
Doug Robbins - 26 Aug 2005 05:43 GMT
You would have to tell us where the image is and show us the code that was
used to put it there to be able to help you.

Signature

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

> Hope some one can help.
>
[quoted text clipped - 7 lines]
>
> Thanks.
teddy b - 27 Aug 2005 15:42 GMT
I create a bookmark call Logo at my Word Template. The logo will call out
base on selection. Found that if i change my option, the new option logo will
overlapping the old logo. I hope can clear the old logo and new logo replace
base on new option.

Below is my code:

With wb.Sheets(2)
           LastRow = .Range("A65536").End(xlUp).Row
           For z = 2 To LastRow
               If (.Range("A" & z).Text) = cboBusiness.Value Then
                  'Check Image
                  If Len(Dir("C:\Program Files\Microsoft Office\Templates\"
& (.Range("D" & z).Text))) > 0 Then
                   
                     ActiveDocument.Bookmarks("Logo").Range.InlineShapes.
AddPicture FileName:="C:\Program Files\Microsoft Office\Templates\" & (.Range
("D" & z).Text), LinkToFile:=False
                       
                  End If
               End If
           Next z
End With

Thanks.

>You would have to tell us where the image is and show us the code that was
>used to put it there to be able to help you.
[quoted text clipped - 4 lines]
>>
>> Thanks.
Doug Robbins - 27 Aug 2005 19:03 GMT
Due to the difficulty of working with bookmarks, can you have a table into
which you insert the logo.

Assuming that it's the first table in the document and that it only contains
one cell, then you can use

With ActiveDocument.Tables(1).Cell(1,1).Range
  .Delete
  .InlineShapes.AddPicture FileName:="C:\Program Files\Microsoft
Office\Templates\" & _
   (.Range("D" & z).Text), LinkToFile:=False
End With

Which will clear anything from the cell and insert the logo into it.

Using a bookmark, it is very hard to avoid deleting the bookmark when trying
to do something like this.

Signature

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

>I create a bookmark call Logo at my Word Template. The logo will call out
> base on selection. Found that if i change my option, the new option logo
[quoted text clipped - 34 lines]
>>>
>>> Thanks.
teddy b - 28 Aug 2005 03:27 GMT
Thanks Doug. It's work. Now i got  other problem.

My table is in header. How to place my logo there and how to wrap my logo
(set to Through in my code?) so that i want it to show in my document but not
to printed out.

Thanks a lot.

>Due to the difficulty of working with bookmarks, can you have a table into
>which you insert the logo.
[quoted text clipped - 19 lines]
>>>>
>>>> Thanks.
Doug Robbins - 28 Aug 2005 07:15 GMT
With
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Tables(1).Cell(1,
1).Range
  .Delete
  .InlineShapes.AddPicture FileName:="C:\Program Files\Microsoft
Office\Templates\" & _
   (.Range("D" & z).Text), LinkToFile:=False
End With

Will deal with a table in the primary header of the document.

If you don't want the logo to print, uncheck the "Drawing objects" box under
Tools>Options>Print
Signature

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

> Thanks Doug. It's work. Now i got  other problem.
>
[quoted text clipped - 30 lines]
>>>>>
>>>>> Thanks.
teddy b - 31 Aug 2005 08:36 GMT
I had reply to this msg but it look like not stored?

>With
>ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Tables(1).Cell(1,
[quoted text clipped - 14 lines]
>>>>>>
>>>>>> Thanks.
teddy b - 31 Aug 2005 08:40 GMT
I try that b4 but it not working. I'm include this to my script Application.
Options.PrintDrawingObjects = False and the Tools ->Obtions ->Print ->
Drawing Objects is uncheck. Mission Failed.

It only work after i wrap it manually. How to wrap the image within a FRAME
and TABLE in header?

Thanks.

cheer,
teddy

>I had reply to this msg but it look like not stored?
>
[quoted text clipped - 3 lines]
>>>>>>>
>>>>>>> Thanks.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.