Copy/Paste VBA

VISIO

    Sponsored Links

    Next

  • 1. ERD, OR relationship
    Yup, using the EE diagram shapes in 2002 Pro. Drop a Logic Gates 2 symbol onto your page and right-click to access the "Configure Logic Gate..." option in the context menu. Note that the default is AND, and for some unknown reason OR is up above it; you have to scroll up in the dropdown combo to select the OR flavor. Hope that helps! Randall Arnold "Vira" < XXXX@XXXXX.COM > wrote in message news: XXXX@XXXXX.COM ... > Hi, > > I wonder if there is a way to draw OR relationship in Visio 2002. > Anyone have done it? > > Thank you!
  • 2. database model diagram - relationships
    Is it possible to see wich fields are used in a relationship. I don't want to select a relationship but I want to see it directly. Thanx, Joep Admiraal
  • 3. Service Pack 2 is now available for Visio 2000 and Visio 2002!!
    Have you seen this update on printing difficulties with SP2 in the General Questions "Visio 2000 SP2 got problem!!, always print to default printer, even if you select another Two of us have been able to verify that installing SP2 causes Visio 2000 to only use the Windows Default Printer, no matter which printer you choose to print to.
  • 4. vb add-in
    I have the same problem as described in the posts below. I tried what was suggested, but every time I start VB, the additional tool bar shows up again. And in the add-in manager all the options are checked again. How do I delete this tool bar permenantly Thanks ********** It comes from a Visual Basic COM addin from the UML solution. In VB selec the add-in menu item, then select Add-in manager. Scroll through the lis of add-ins looking for with the name "Microsoft Visio UML Visual Basi Add-in" (name may vary with different versions of Visio but should b something like this). Select it and then uncheck all the load option under load behavior. This should cause the add-in to be unloaded and fo the toolbar to go away. Note: repairing Visio may cause it to appea again -Heid Microsoft Corporatio This posting is provided "AS IS" with no warranties, and confers no rights "Uzi Barzilai" < XXXX@XXXXX.COM > wrote in messag news:% XXXX@XXXXX.COM .. > After installing Visio on this (Home XP) compute > an uninvited Toolbar is showing on Visual Basic >> How can it be removed >> Thanks > Uzi >>
  • 5. Merge two visio documents
    Is there any possible way to merge two visio documents? That way two different people can work on the same project and merge the documents without having someone retype everything the other person did to update the document.

Copy/Paste VBA

Postby RGFuaWVsIEgu » Tue, 25 Nov 2003 17:01:08 GMT

Ich will eine ganze Visio Seite kopieren mit allen Verbindungen zwischen den Shape
und deren Verklebungen (glue
Ich habs versucht mit select all, group , copy paste und ungroup auch mit der Option bei
copy/paste das es an der orignalposition positioniert werden sol
abe
1) die Positionen stimmten nicht berei
2) die Verbindungen waren eingetragen aber nicht verglue

Was nun einer eine Version die funktioniert und einfach is

thx, mfg Daniel H.

Re: Copy/Paste VBA

Postby Mark Nelson [MS] » Wed, 26 Nov 2003 06:33:52 GMT

You might try Copy / Paste without doing the Group / Ungroup.

Are you working with a specific set of shapes?  Some Visio shapes have
protections that control their position.

(Feel free to reply in either English or German.)

-- 
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.






den Shapes
der Option bei



Re: Copy/Paste VBA

Postby Senaj Lelic [DE MVP Visio] » Wed, 26 Nov 2003 17:51:55 GMT

Das ist recht problematisch:
1. Die korrekte Position erhtst Du mit Group (einfach ein Rechteck nehmen
.lweches genauso groist wie die Seite, das als Gruppenmitglied machenund
mit kopieren - nachher lchen.
2. Wieso werden die Verbindungen wieder gelt ? das hatte ich noch nie.
Hast Du mal ne Beispiel-datei   ?

-- 
Mit freundlichen Gren
Senaj Lelic
DE MVP VIsio


"Daniel H."<< XXXX@XXXXX.COM >> schrieb im Newsbeitrag


>> Ich will eine ganze Visio Seite kopieren mit allen Verbindungen zwischen
den Shapes
>> und deren Verklebungen (glue)
>> Ich habs versucht mit select all, group , copy paste und ungroup auch mit
der Option bei
>> copy/paste das es an der orignalposition positioniert werden soll
>> aber
>> 1) die Positionen stimmten nicht erein
>> 2) die Verbindungen waren eingetragen aber nicht verglued
>>
>> Was nun einer eine Version die funktioniert und einfach ist
>>
>> thx, mfg Daniel H.



Similar Threads:

1.Help with copy/paste VBA code

Hi folks,
I have an excel workbook where different revenue scnearios 
are entered and then you get a table and couple of graphs.
What I like to be able to do is:

I like to add a command button on a sheet where if 
clicked, it will copy a table and couple of charts, then 
paste them in an empty sheet.  

Then next time the button is clicked, it will do the same 
things but now pastes these in the next empty sheet.. and 
so on.  

how does one do this.

2.Mercy - Need help with Copy/Paste VBA

My reverse engineering skills have finally failed me =(

I need to copy rows based on a set value in Column A, to a different 
worksheet and start on the next empty row. I also need to paste special as 
the values in the source sheet are generated via formulas.

Sub CopySAP()
    
RowCount = 2

With Worksheets("SAPUpload").Range("a3:a200")
      Set c = .Find("1", LookIn:=xlValues)
      If Not c Is Nothing Then
       firstAddress = c.Address
       Do
        c.EntireRow.Copy _
           Destination:=Worksheets("SAPUpload2").Rows(RowCount)
        RowCount = RowCount + 1
        Set c = .FindNext(c)
      Loop While Not c Is Nothing And c.Address <> firstAddress
      End If
      
    End With

End Sub

3.copy/paste VBA

I am trying to write code that will search a sheet and 
select all of the rows that contain a certain date.  Then 
I want to copy/paste all of the rows onto a different 
sheet.
I am having some trouble with this, please help!
Matt

4.Copy paste VBA

5.VBA Copy / Paste -or- Sharing between visio documents

Using Visio 2003

Many are looking for a solution for which Visio does not provide; in
comparison to Excel or Word.

I know enough of VBA to be extremely dangerous - especially when it
comes to Visio which seems quite difficult to predict.  Any additional
help would be extremely helpful.  My intention is to make Visio easier
and more efficient for my use only.  I truly do not want learn to
"program" in any language as that is not my talent nor desire.  You
will see that my inability to correctly perceive just how to get the
code working (as extracted) tells the greatest truth about my VBA
(in)abilities.

My goal is to Copy a current Visio "sheet" to a new sheet (with the
same sheet-name in a New workbook) similar to what one can do in Excel.

If the code below is not that, then could someone help me get the code
below working? The break down is in the first sub-routine which is
clearly marked as an extract.

****************************************************************
From: "Al Edlund" < XXXX@XXXXX.COM >
References: < XXXX@XXXXX.COM >
Subject: Re: Visio2003 Pro - what means "Windows XP User Interface"
feature ?
Date: Mon, 23 May 2005 09:08:38 -0500

(I did attempt to email to the above lastname@....... but it bounced.)


The VBA as best as I could decifer was:

****************************************************************
Sub myCopyPaste()  'This was added by me
   ' Process the pages
   strCurStep = "start process other files"
   Set pagsObj = srcDoc.Pages
   ' iterate through the collection
   For curPageIndx = 1 To pagsObj.Count
      ' retrieve the page object at the current index
      Set srcPage = pagsObj.Item(curPageIndx)

      ' Check whether the current page is a background page
      ' Display the name of all the foreground pages
      If srcPage.Background = False Then
         strCurStep = "work on foreground pages"
         ' take spaces out of the document name
         strDocName = funcReplaceStr(srcDoc.Name, " ", "", 1)

      ' create the new page
      Set tgtPage = tgtDoc.Pages.Add
      ' the target page name is the source document and page number
      tgtPage.Name = Left(funcGetTokens(strDocName,"Guideline", 1), 23)
& curPageIndx & "Exmpl"
      tgtPage.BackPage = "Background General"
      tgtPage.Background = False
      blnResult = funcCopyPageFormat(tgtPage, srcPage)
      If blnResult = False Then Debug.Print "Result Copy Page format
failed"
         strCurStep = "copy the page"
         Visio.Application.ScreenUpdatig = False
         blnResult = funcCopyPage(tgtPage, srcPage)
      If blnResult = False Then Debug.Print "Result Copy Page failed"
         Visio.Application.ScreenUpdatig = True
         tgtWin.Activate
         ActivePage.Name = tgtPage.Name
           ActivePage.CenterDrawing
      Else
         ' Process the background page or delete this section to ignore
the background pages
      End If
   Next curPageIndx
End Sub  'This was added by me
****************************************************

Private Function funcCopyPage(tgtPage As Visio.Page, srcPage As
Visio.Page) As Boolean
   Dim iObjCnt As Integer
   Dim iConCtr As Integer
   Dim iWinCtr As Integer
   Dim strPageName As String
   Dim curWin As Visio.Window
   Dim strCurStep As String
   On Error GoTo CopyPage_Err

   ' go to the source window
   strCurStep = "activate source win"
   srcWin.Activate
   ActivePage.Name = srcPage.Name
   ' brute force method of copy
   strCurStep = "Copy source"
   ActiveWindow.SelectAll
   ActiveWindow.Group
   ActiveWindow.Copy

   ' now go and paste it
   strCurStep = "activate target win"
   tgtWin.Activate
   strCurStep = "set target apctive page"
   ActivePage.Name = tgtPage.Name
   ActivePage.Paste

   funcCopyPage = True

   CopyPage_Exit:
      DoEvents
      Exit Function

   CopyPage_Err:

      Debug.Print "Error CopyPage Cur Step = "; strCurStep
      Debug.Print "Error CopyPage " & Err.Number & ": " &
Err.Description
      funcCopyPage = False
      Resume CopyPage_Exit

End Function

'   We want to copy page formats to target pages for a number of
reasons
'   which include common looks as well as maintaining integrity of
copied
'   pages.

Private Function funcCopyPageFormat(tgtPage As Visio.Page, srcPage As
Visio.Page) As Boolean

   Dim tgtPageSheet As Visio.Shape
   Dim srcPageSheet As Visio.Shape

   On Error GoTo CopyPageFormat_Err

      Set tgtPageSheet = tgtPage.PageSheet
      Set srcPageSheet = srcPage.PageSheet

      'Debug.Print "change size type"
      tgtPageSheet.Cells("DrawingSizType").FormulaU =
srcPageSheet.Cells("DrawingSizType").FormulaU
      'Debug.Print "change scale type"
      tgtPageSheet.Cells("DrawingScaeType").FormulaU =
srcPageSheet.Cells("DrawingScaeType").FormulaU
      'Debug.Print " drawing scale"
      tgtPageSheet.Cells("DrawingScae").FormulaU =
srcPageSheet.Cells("DrawingScae").FormulaU
      'Debug.Print " page scale "
      tgtPageSheet.Cells("PageScale".FormulaU =
srcPageSheet.Cells("PageScale".FormulaU
      'Debug.Print "width"
      tgtPageSheet.Cells("PageWidth".FormulaU =
srcPageSheet.Cells("PageWidth".FormulaU
      'Debug.Print "height"
      tgtPageSheet.Cells("PageHeight).FormulaU =
srcPageSheet.Cells("PageHeight).FormulaU
      'Debug.Print "route"
      tgtPageSheet.Cells("RouteStyle).FormulaU =
srcPageSheet.Cells("RouteStyle).FormulaU

      funcCopyPageFormat = True

   CopyPageFormat_Exit:
       DoEvents
       Exit Function

   CopyPageFormat_Err:

       Debug.Print "Error CopyPageFormat " & Err.Number & ": " &
Err.Description
       funcCopyPageFormat = False
       Resume CopyPageFormat_Exit 

End Function

6. Help with VBA code to Copy / Paste Visio sheet to another Visi

7. Help with VBA code to Copy / Paste Visio sheet to another Visio fi

8. CONTROLS - Copy/Paste : inverted pasting order !



Return to VISIO

 

Who is online

Users browsing this forum: No registered users and 57 guest