LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Creating a Word Document from Excel Data

I have managed to create a work document containing all the formulas in a
selected worksheet. However, when I try in Excel VBA to add a footer to the
word document only part of the footer is created. The code I am using, which
I got from running a macro in Word is

.Selection.TypeText Text:="Page "
.Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldPage
.Selection.TypeText Text:=" of "
.Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldNumPages
.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

The code lines that start with ".Selection.Fields.Add Range:" does NOT
work.

Any suggestions???

Thanks
 
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
Merge Excel Data to a Word document Heather Excel Discussion (Misc queries) 1 August 21st 09 08:23 PM
Export excel data to word document mda19652 Excel Discussion (Misc queries) 1 November 1st 07 12:01 PM
help creating a macro in excel that opens a specific word document Prohock Excel Discussion (Misc queries) 3 March 30th 06 04:58 PM
how can I import excel data to word document powersree Excel Discussion (Misc queries) 1 October 10th 05 12:10 AM
Problem with creating a Word Document Jens 'Kluesi' Kluesener Excel Programming 0 September 22nd 03 12:04 PM


All times are GMT +1. The time now is 09:49 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"