Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 163
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default 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
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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
any formula to convert numbers in word form, e.g. "2" as "Two"? Neeraj Excel Worksheet Functions 1 May 26th 08 01:03 PM
Check if cells contain the word "Thailand", return "TRUE" ali Excel Worksheet Functions 7 September 14th 07 09:53 AM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
Email from Excel; MS warning "program is trying to send mail on your behalf" KR Excel Programming 2 July 11th 05 05:00 PM


All times are GMT +1. The time now is 05:04 PM.

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

About Us

"It's about Microsoft Excel"