Author Topic: Visio Paste in same location as original shape  (Read 681 times)

0 Members and 1 Guest are viewing this topic.

Visisthebest

  • Hero Member
  • *****
  • Posts: 886
Visio Paste in same location as original shape
« on: September 05, 2023, 07:00:41 AM »
I found a post on this subject:
http://visguy.com/vgforum/index.php?topic=1844.0

But I wonder if, rather than using the context menu to paste, if there is a way to get the shape pasted on the same place with CTRL+V (Paste shortcut).

Maybe something I can set with VBA/VB.NET? (so when the user uses CTRL+V, the behavior is paste in original shape's location).

CTRL+V (Paste shortcut) sometimes works fine pastes in place, but most often it pastes with an offset from the original shape's position.
Visio 2021 Professional

Surrogate

  • Hero Member
  • *****
  • Posts: 1836
    • ShapeSheet™ Knowledge Base
Re: Visio Paste in same location as original shape
« Reply #1 on: September 05, 2023, 08:17:53 AM »
Shape.Paste method have flags, which determines how shapes are translated during the paste operation.
« Last Edit: September 05, 2023, 08:20:43 AM by Surrogate »

Visisthebest

  • Hero Member
  • *****
  • Posts: 886
Re: Visio Paste in same location as original shape
« Reply #2 on: September 05, 2023, 09:21:04 AM »
Thank you Surrogate I found those, but how to set this when a user performs the action via CTRL+V so there is no code running just default Visio paste functionality?
Visio 2021 Professional

Surrogate

  • Hero Member
  • *****
  • Posts: 1836
    • ShapeSheet™ Knowledge Base
Re: Visio Paste in same location as original shape
« Reply #3 on: September 05, 2023, 09:57:07 AM »
Tips for Copy/Paste in Visio 2010 (Including How to Copy a Page) (Visio Insights blog post)

OFFTOPIC
visCopyPasteNormal 0 Default value. Shapes are copied/pasted to the center of the active window.
visCopyPasteNoTranslate 1 Shapes are copied/pasted to their original coordinate locations.
visCopyPasteCenter 2 Copy shapes to the center of the page.
« Last Edit: September 05, 2023, 10:59:29 AM by Surrogate »