#1   Report Post  
Posted to microsoft.public.word.docmanagement
Roy Roy is offline
external usenet poster
 
Posts: 21
Default Format issues

I have created a template in word which I call through a VB script from
excel. The excel data is populated in the word every time I run this script.

Everything works fine and the data get populated.

I have a header in the template which is represents one of the fields in the
excel sheet. The header shows the correct linked value for the first 10 pages
but then on shows the variable name instead of the value. I have no idea why
it does that?

can someone help

The code is as follows:
For iCurrentRow = 1 To iLastRow
If ActiveSheet.Range("B" & iCurrentRow) "" Then
sFindText = ActiveSheet.Range("Q" & iCurrentRow)
sReplaceText = ActiveSheet.Range("B" & iCurrentRow)
'FindReplace sFindText, sReplaceText, objWord.Selection
End If
Next iCurrentRow


  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Format issues

Exactly what is it that appears on the 11th and following pages?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Roy" wrote in message
...
I have created a template in word which I call through a VB script from
excel. The excel data is populated in the word every time I run this
script.

Everything works fine and the data get populated.

I have a header in the template which is represents one of the fields in
the
excel sheet. The header shows the correct linked value for the first 10
pages
but then on shows the variable name instead of the value. I have no idea
why
it does that?

can someone help

The code is as follows:
For iCurrentRow = 1 To iLastRow
If ActiveSheet.Range("B" & iCurrentRow) "" Then
sFindText = ActiveSheet.Range("Q" & iCurrentRow)
sReplaceText = ActiveSheet.Range("B" & iCurrentRow)
'FindReplace sFindText, sReplaceText, objWord.Selection
End If
Next iCurrentRow


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink issues Redd Microsoft Word Help 4 October 30th 07 08:00 PM
MailMerge Issues - doc 'forgets' source data, other issues Robert_L_Ross Mailmerge 2 February 22nd 07 10:38 AM
Page format issues maurgo Microsoft Word Help 4 November 28th 06 11:37 PM
Combo Box issues...again LeahT Microsoft Word Help 1 August 15th 06 12:24 AM
SP2 Issues? Ross Payne New Users 3 November 20th 05 05:26 AM


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

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"