Reply
 
Thread Tools Display Modes
  #1   Report Post  
teddy b via OfficeKB.com
 
Posts: n/a
Default 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   Report Post  
Doug Robbins
 
Posts: n/a
Default

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   Report Post  
teddy b via OfficeKB.com
 
Posts: n/a
Default

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   Report Post  
Doug Robbins
 
Posts: n/a
Default

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   Report Post  
teddy b via OfficeKB.com
 
Posts: n/a
Default

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   Report Post  
Doug Robbins
 
Posts: n/a
Default

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   Report Post  
teddy b via OfficeKB.com
 
Posts: n/a
Default

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   Report Post  
teddy b via OfficeKB.com
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Resizes Image Tushar Manik Microsoft Word Help 3 July 15th 13 05:14 AM
How to control image size using nested INCLUDEPICTURE field 2dogs Mailmerge 1 May 11th 05 11:44 AM
Replacement Of Company Logo Image In Multiple Word Documents Bio_Jazz Microsoft Word Help 3 March 16th 05 10:50 PM
Replacement Of Company Logo Image In Multiple Word Documents bio_jazz Microsoft Word Help 0 March 16th 05 06:13 PM
Hyperlink from Word to Excel bookmark rawahoho Microsoft Word Help 2 February 22nd 05 11:29 PM


All times are GMT +1. The time now is 01:43 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"