+ Reply to Thread
Results 1 to 3 of 3

Export Excel Shape to Word

  1. #1
    Registered User
    Join Date
    06-07-2006
    Posts
    58

    Export Excel Shape to Word

    Hi,
    in my excel file, I ve got a Button to copy the Shape "titi" to an Microsoft Word Document.
    It seems there is a problem with the Paste function but do not know what !!??
    Anyone to help me ?

    Thanks
    Herve
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-24-2007
    Location
    Southampton, UK
    Posts
    137
    I've gone back to some code I did a couple of years ago when I needed to copy & paste from Excel to Word and extracted some of the statements I employed, and the following should do what you need under the command button . . .

    Please Login or Register  to view this content.
    I've used the Paste Special command to paste the diagram in as a picture (otherwise it goes in as an editable MS Office Drawing as a default).

    I'm not sure what the correct way of referencing Word might be after using the Application.ActivateMicrosoftApp xlMicrosoftWord statement in your original code.

  3. #3
    Registered User
    Join Date
    06-07-2006
    Posts
    58
    After, a While, I 've tried this way and It works.
    Thanks



    Private Sub CommandButton1_Click()
    Dim WordApp As Word.Application
    Sheets("Test").Shapes("titi").Copy

    Set WordApp = CreateObject("Word.Application")
    On Error Resume Next
    WordApp.Documents.Add
    WordApp.Visible = True

    WordApp.Selection.PasteSpecial DataType:=wdPasteShape
    Application.CutCopyMode = False
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1