Results 1 to 3 of 3

Place Cursor at Bookmark

Threaded View

  1. #1
    Registered User
    Join Date
    06-27-2007
    Posts
    8

    Place Cursor at Bookmark

    I have used the following coe to open a word template and selct a cell in excel that needs to be pasted to a bookmark in word.

    The code highlights the whole document but I need it to place the copied cell at the bookmark.

    Can somone give me an idea as to the code that will select the bookmark and paste the copied cell.

    The last line highlighted shows as runtime error 424, if that helps.

    Sub Address()
    Dim wdApp As Object
        Dim wdDoc As Object
        Set wdApp = CreateObject("Word.application")
        Set wdDoc = wdApp.Documents.Open _
          (FileName:="C:\My Documents\MCR\Clt Ltrs\Let1")
        wdApp.Visible = True
    
    Range("A1").Select
    Range("B60").Select
    Selection.Copy
    wdDoc.Select
    ActiveDocument.Bookmarks("Address1").Range.Text = "Hello world"
    
    End Sub
    Last edited by Wakey1; 07-18-2007 at 04:09 PM.

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