Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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 |
#2
![]() |
|||
|
|||
![]() Quote:
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
input in number form is being multiplied by 1000 when i input. | Excel Discussion (Misc queries) | |||
How to Transfer data from Text Form Fields in MS Word into Excel? | Excel Discussion (Misc queries) | |||
Put form fields in Word forms into an Excel spreadsheet? | Excel Discussion (Misc queries) | |||
How do I put my information form Excel into a Word Merge Form? | Excel Discussion (Misc queries) | |||
can we link fields from a form in word document to excel | Excel Discussion (Misc queries) |