|
-
May 31st, 2006, 02:50 PM
#1
Thread Starter
Lively Member
Replace Object
How do I replace a shape with a copy of another shape. This is the code that I have so far.
VB Code:
With ActiveDocument.Shapes(1)
.Select
Selection.InlineShapes(1).Select
Selection.copy
.Select
' Replace shape with inlineshape
End with
So I have a copy of the inline shape in the clipboard. And I have the shape that I want to replace selected. Now how do I go about replacing it?
"A candle loses nothing by lighting another candle."
-
Jun 1st, 2006, 02:51 PM
#2
New Member
Re: Replace Object
shape1.length = shape2.length
shape1.height = shape2.height
Is that what you mean?
Are they both in the same application?
-
Jun 1st, 2006, 03:07 PM
#3
Thread Starter
Lively Member
Re: Replace Object
Your post does not make sense to me.
I am not sure what the length and the height of the shape have to do with replacing the shape. And being that this is a word document I dont see what different applications would refer to.
Please clarify.
"A candle loses nothing by lighting another candle."
-
Jun 2nd, 2006, 01:17 AM
#4
New Member
Re: Replace Object
I mis understood what you needed to do, i made a sugestion based on what i thought you needed but apparently i was well wide of the mark, sorry
-
Jun 2nd, 2006, 01:19 AM
#5
Re: Replace Object
Record a macro of you doing the task and then check out the generated module code. With a little tweaking it will be useful.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|