Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 13
Default

Quote:
Originally Posted by ArmsteR View Post
Good afternoon all,

I have an excel problem I could do with some direction with.

Basically This is a work in progress but once this one piece is sorted I can manipulate it to replicate down....

We have an excel spreadsheet that has information such as site name, site code, etc etc etc. the corresponding value for these we need adding to a MS Word template, then saving and the saved location copied back into excel...

The bit I can't do at the moment is how do you take the information from excel into word? the code below is the initial setup i have to do this but can't think of how to start the import bit...

The word form text fields have bookmarks called Author, sitetext, reftext etc which are located in cells A1, B1 and C1 respectively or workbook "EntryForm"


Code:
Sub Word1()
'
' WORD1 Macro
' Opens an instance of MS Word and then opens the document Below to be confirgured
'
ActiveWindow.Visible = False
Windows("Form test.xls").Activate
Set WordApp = CreateObject("Word.Application")
WordApp.Visible = True
WordApp.Documents.Open "E:\Marks form control\ch23\siteform.doc"


' After document is open the next stage is to perform your alterations





Set WordDoc = Nothing
Set WordApp = Nothing

End Sub




any helps or pointers would be appreciated





Ok here is what i've got now




Code:
Sub Word1()
 
    Dim WordApp As Object
    Dim SaveAsName As String
    
' Opens an instance of MS Word and then opens the document Below to be confirgured
'
    
    Sheets("EntryForm").Select
Range("B1").Select
Selection.Copy

    
    ActiveWindow.Visible = False
    Windows("Form test.xls").Activate
    Set WordApp = CreateObject("Word.Application")
    WordApp.Visible = True
    WordApp.Documents.Open "E:\Marks form control\siteform.doc"
WordApp.Selection.PasteSpecial Link:=False, Placement:=Bookmarks("Sitetext"), DisplayAsIcon:=False
' WordApp.ActiveDocument.Bookmarks("Sitetext").Range
    

    
    Set WordDoc = Nothing
    Set WordApp = Nothing
 
End Sub
this wont function any ideas why ?
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
input in number form is being multiplied by 1000 when i input. jweinograd Excel Discussion (Misc queries) 4 April 16th 07 11:18 PM
How to Transfer data from Text Form Fields in MS Word into Excel? CWillis Excel Discussion (Misc queries) 1 July 18th 06 06:35 AM
Put form fields in Word forms into an Excel spreadsheet? AMG Excel Discussion (Misc queries) 4 May 15th 06 06:18 AM
How do I put my information form Excel into a Word Merge Form? Jackie Excel Discussion (Misc queries) 2 March 16th 06 08:16 PM
can we link fields from a form in word document to excel Sunil Excel Discussion (Misc queries) 0 February 6th 06 09:26 PM


All times are GMT +1. The time now is 06:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"