Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trying to use Excel to "program" word doc
Hello Group,
I am trying to use vba code from an excel worksheet to load data at bookmarks on a word doc. That seems to be ok it the bookmarks are defined in the word doc. I thought I would try to run some sub proc and functions (in vba Excel side) to add booksmarks to the word document (from subs, etc in excel) and then put data on them, move a line or 2 or 3 down, and add more bookmarks, etc. Been having trouble doing this, particularly to add a bookmark, etc. Does this make sense? or should I put code in the Word doc, that pulls the data from Excel??? Any ideas will help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trying to use Excel to "program" word doc
Personally, it is the code writer's choice. I have written in both and my
preference is Excel. But I have not done anything with bookmark, I was just composing letters and adding data in at certain points. "Eric" wrote: Hello Group, I am trying to use vba code from an excel worksheet to load data at bookmarks on a word doc. That seems to be ok it the bookmarks are defined in the word doc. I thought I would try to run some sub proc and functions (in vba Excel side) to add booksmarks to the word document (from subs, etc in excel) and then put data on them, move a line or 2 or 3 down, and add more bookmarks, etc. Been having trouble doing this, particularly to add a bookmark, etc. Does this make sense? or should I put code in the Word doc, that pulls the data from Excel??? Any ideas will help |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trying to use Excel to "program" word doc
Hi Eric,
Does this make sense? or should I put code in the Word doc, that pulls the data from Excel??? that's just about the same. The only thing you have to think about is where the data from Excel should be placed in Word. Working with lines is not a good concept, as lines are recalculated on the fly and depend on the selected printer, on fonts available, on font substitution etc... You may place the data at the n-th character of a doc, before it, after it, or replace it, at the start on the n-th section, at the start on the n-th paragraph, n characters after the start of paragraph x, uncountable ways. -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Win XP, Office 2003 "red.sys" & Chr$(64) & "t-online.de" |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trying to use Excel to "program" word doc
Hi Eric,
I have the same thing to do. i.e. Make an word document from excel data. I'm wondering if you've got to do that? Thanks! Alex -- Alex St-Pierre "Eric" wrote: Hello Group, I am trying to use vba code from an excel worksheet to load data at bookmarks on a word doc. That seems to be ok it the bookmarks are defined in the word doc. I thought I would try to run some sub proc and functions (in vba Excel side) to add booksmarks to the word document (from subs, etc in excel) and then put data on them, move a line or 2 or 3 down, and add more bookmarks, etc. Been having trouble doing this, particularly to add a bookmark, etc. Does this make sense? or should I put code in the Word doc, that pulls the data from Excel??? Any ideas will help |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trying to use Excel to "program" word doc
Alex St-Pierre wrote: Hi Eric, I have the same thing to do. i.e. Make an word document from excel data. I'm wondering if you've got to do that? Thanks! Alex -- Alex St-Pierre "Eric" wrote: Hello Group, I am trying to use vba code from an excel worksheet to load data at bookmarks on a word doc. That seems to be ok it the bookmarks are defined in the word doc. I thought I would try to run some sub proc and functions (in vba Excel side) to add booksmarks to the word document (from subs, etc in excel) and then put data on them, move a line or 2 or 3 down, and add more bookmarks, etc. Been having trouble doing this, particularly to add a bookmark, etc. Does this make sense? or should I put code in the Word doc, that pulls the data from Excel??? Any ideas will help Hello Alex, I got it all to work. It may not be elegant, there is always room for improvement. I am able to to all that i need to do. I use a template for starters, with styles set I use the Excel worksheet to hold the data that ends up in the Word document. I have functions and sub procedures that transfer the data, and create the formats, etc. If you need more info on this (or a copy of the excel workbook, and the word template), let me know. I will check the group's posting later on. thanks, eric |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trying to use Excel to "program" word doc
Hi Eric,
Yes, I have the same work to do. I wanted to make a mailmerge from excel but finally, I have decided to start from zero and create the word document and style from excel. Last week, I have learned how to program with Word (set object and add text with oRange.InsertAfter) If you want to send me your file, I'll appreciate! My address is alexstpierre a.t h.o.t.m.a.i.l Thank you! Alex -- Alex St-Pierre "eholz1" wrote: Alex St-Pierre wrote: Hi Eric, I have the same thing to do. i.e. Make an word document from excel data. I'm wondering if you've got to do that? Thanks! Alex -- Alex St-Pierre "Eric" wrote: Hello Group, I am trying to use vba code from an excel worksheet to load data at bookmarks on a word doc. That seems to be ok it the bookmarks are defined in the word doc. I thought I would try to run some sub proc and functions (in vba Excel side) to add booksmarks to the word document (from subs, etc in excel) and then put data on them, move a line or 2 or 3 down, and add more bookmarks, etc. Been having trouble doing this, particularly to add a bookmark, etc. Does this make sense? or should I put code in the Word doc, that pulls the data from Excel??? Any ideas will help Hello Alex, I got it all to work. It may not be elegant, there is always room for improvement. I am able to to all that i need to do. I use a template for starters, with styles set I use the Excel worksheet to hold the data that ends up in the Word document. I have functions and sub procedures that transfer the data, and create the formats, etc. If you need more info on this (or a copy of the excel workbook, and the word template), let me know. I will check the group's posting later on. thanks, eric |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
any formula to convert numbers in word form, e.g. "2" as "Two"? | Excel Worksheet Functions | |||
Check if cells contain the word "Thailand", return "TRUE" | Excel Worksheet Functions | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) | |||
Email from Excel; MS warning "program is trying to send mail on your behalf" | Excel Programming |