Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Clear Bookmark Content (Image)
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. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...merge/200508/1 |
#2
|
|||
|
|||
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. -- 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 "teddy b via OfficeKB.com" wrote in message ... 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. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...merge/200508/1 |
#3
|
|||
|
|||
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.InlineShape s. AddPicture FileName:="C:\Program Files\Microsoft Office\Templates\" & (.Range ("D" & z).Text), LinkToFile:=False End If End If Next z End With Thanks. Doug Robbins wrote: 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. Hope some one can help. [quoted text clipped - 7 lines] Thanks. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...merge/200508/1 |
#4
|
|||
|
|||
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. -- 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 "teddy b via OfficeKB.com" wrote in message ... 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.InlineShape s. AddPicture FileName:="C:\Program Files\Microsoft Office\Templates\" & (.Range ("D" & z).Text), LinkToFile:=False End If End If Next z End With Thanks. Doug Robbins wrote: 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. Hope some one can help. [quoted text clipped - 7 lines] Thanks. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...merge/200508/1 |
#5
|
|||
|
|||
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. Doug Robbins wrote: 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. 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. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...merge/200508/1 |
#6
|
|||
|
|||
With
ActiveDocument.Sections(1).Headers(wdHeaderFooterP rimary).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 ToolsOptionsPrint -- 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 "teddy b via OfficeKB.com" wrote in message ... 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. Doug Robbins wrote: 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. 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. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...merge/200508/1 |
#7
|
|||
|
|||
I had reply to this msg but it look like not stored?
Doug Robbins wrote: With ActiveDocument.Sections(1).Headers(wdHeaderFooter Primary).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 ToolsOptionsPrint Thanks Doug. It's work. Now i got other problem. [quoted text clipped - 30 lines] Thanks. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...merge/200508/1 |
#8
|
|||
|
|||
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 teddy b wrote: I had reply to this msg but it look like not stored? With ActiveDocument.Sections(1).Headers(wdHeaderFoote rPrimary).Range.Tables(1).Cell(1, [quoted text clipped - 14 lines] Thanks. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...merge/200508/1 |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word Resizes Image | Microsoft Word Help | |||
How to control image size using nested INCLUDEPICTURE field | Mailmerge | |||
Replacement Of Company Logo Image In Multiple Word Documents | Microsoft Word Help | |||
Replacement Of Company Logo Image In Multiple Word Documents | Microsoft Word Help | |||
Hyperlink from Word to Excel bookmark | Microsoft Word Help |