LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Printing from EXCEL using a macro

Are you sure that cell C contains the name of an existing file?
If it contains a filename without the directory folder path,
you'll need to use ChDrive and ChDir to set the default folder.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"jim9912" wrote in message
ups.com...
Hi,

THanks so much for helping --

I'm using Office 97 (not my decision - corporate stinginess) so
I used
the object library 8.0, the only option listed in references.

When I run the macro I get the following error:

run time error '4198' command failed

The debugger points to this line:

Set WDDoc = WDApp.Documents.Open(c.Value)



My data starts in cell d5, so I changed

Set rngFiles = Range("A2", Cells(Rows.Count, "A").End(xlUp))

to:

Set rngFiles = Range("D5", Cells(Rows.Count, "D").End(xlUp))

Same error as above.

I'm a vba novice, so forgive me if I'm missing something
obvious.



 
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
Printing Macro for Excel 97 dhstein Excel Discussion (Misc queries) 0 April 27th 09 05:26 PM
Printing Problem In Excel Due to Macro? [email protected] Excel Discussion (Misc queries) 4 March 20th 07 04:05 PM
Excel printing macro problem Cam[_6_] Excel Programming 2 February 18th 06 03:48 PM
Excel MAcro/Printing kwedde01 Excel Programming 0 June 9th 05 08:12 PM
Help. Excel Printing Macro wmcray[_5_] Excel Programming 6 September 23rd 04 04:47 AM


All times are GMT +1. The time now is 06:50 AM.

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"