Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default ATTN: Tom Ogilvy or anyone else: send DOS command?

I am using Office 2003 on Windows XP.

I want to send the following DOS command through VBA in Excel:

copy a.htm + b.htm + c.htm d.htm

This command should append a, b, c to a new file d.

Can Tom (or someone who knows) please post example code showing the correct
syntax to run this command? I'm assuming it has to be Shell-ed out.

These files reside on a network share like:

\\fs5\finance\corporate accounting\a.htm

Thanks in advance for your assistance.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Tom Ogilvy or anyone else: send DOS command?

open "c:\temp.bat" for output as #1
write #1."copy a.htm + b.htm + c.htm d.htm"
close
shell "C:\Temp.bat"




"quartz" wrote in message
...
I am using Office 2003 on Windows XP.

I want to send the following DOS command through VBA in Excel:

copy a.htm + b.htm + c.htm d.htm

This command should append a, b, c to a new file d.

Can Tom (or someone who knows) please post example code showing the
correct
syntax to run this command? I'm assuming it has to be Shell-ed out.

These files reside on a network share like:

\\fs5\finance\corporate accounting\a.htm

Thanks in advance for your assistance.





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Tom Ogilvy or anyone else: send DOS command?

Thanks Patrick.

I copied the files to C:\ and renamed them with short names (e.g.
XLHTM1.htm, XLHTM2.htm, etc.). Running the code you suggested executes
without error, but fails to do anything.

i.e. No combined file is generated...what am I doing wrong?

"Patrick Molloy" wrote:

open "c:\temp.bat" for output as #1
write #1."copy a.htm + b.htm + c.htm d.htm"
close
shell "C:\Temp.bat"




"quartz" wrote in message
...
I am using Office 2003 on Windows XP.

I want to send the following DOS command through VBA in Excel:

copy a.htm + b.htm + c.htm d.htm

This command should append a, b, c to a new file d.

Can Tom (or someone who knows) please post example code showing the
correct
syntax to run this command? I'm assuming it has to be Shell-ed out.

These files reside on a network share like:

\\fs5\finance\corporate accounting\a.htm

Thanks in advance for your assistance.






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Tom Ogilvy or anyone else: send DOS command?

You can execute the function without createing the batch file... Check out
this article...

http://support.microsoft.com/default...b;en-us;213800

so it will look something like...

Shell "command.com /c copy a.htm + b.htm + c.htm d.htm"

HTH

"quartz" wrote:

Thanks Patrick.

I copied the files to C:\ and renamed them with short names (e.g.
XLHTM1.htm, XLHTM2.htm, etc.). Running the code you suggested executes
without error, but fails to do anything.

i.e. No combined file is generated...what am I doing wrong?

"Patrick Molloy" wrote:

open "c:\temp.bat" for output as #1
write #1."copy a.htm + b.htm + c.htm d.htm"
close
shell "C:\Temp.bat"




"quartz" wrote in message
...
I am using Office 2003 on Windows XP.

I want to send the following DOS command through VBA in Excel:

copy a.htm + b.htm + c.htm d.htm

This command should append a, b, c to a new file d.

Can Tom (or someone who knows) please post example code showing the
correct
syntax to run this command? I'm assuming it has to be Shell-ed out.

These files reside on a network share like:

\\fs5\finance\corporate accounting\a.htm

Thanks in advance for your assistance.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default ATTN: Tom Ogilvy or anyone else: send DOS command?

See one more response at your other thread.

quartz wrote:

I am using Office 2003 on Windows XP.

I want to send the following DOS command through VBA in Excel:

copy a.htm + b.htm + c.htm d.htm

This command should append a, b, c to a new file d.

Can Tom (or someone who knows) please post example code showing the correct
syntax to run this command? I'm assuming it has to be Shell-ed out.

These files reside on a network share like:

\\fs5\finance\corporate accounting\a.htm

Thanks in advance for your assistance.


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default ATTN: Tom Ogilvy or anyone else: send DOS command?

Thanks to all who responded, you guys really nailed it forme. It works great
and is EXACTLY what I needed. Thanks a lot!

"Dave Peterson" wrote:

See one more response at your other thread.

quartz wrote:

I am using Office 2003 on Windows XP.

I want to send the following DOS command through VBA in Excel:

copy a.htm + b.htm + c.htm d.htm

This command should append a, b, c to a new file d.

Can Tom (or someone who knows) please post example code showing the correct
syntax to run this command? I'm assuming it has to be Shell-ed out.

These files reside on a network share like:

\\fs5\finance\corporate accounting\a.htm

Thanks in advance for your assistance.


--

Dave Peterson

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
Send keys from command button sunspot27 Excel Worksheet Functions 0 July 28th 09 12:10 PM
The Send to command Arup C[_2_] Excel Discussion (Misc queries) 3 January 11th 08 03:29 PM
Send a command down a column mary Excel Discussion (Misc queries) 2 December 7th 07 01:53 AM
Auto Send email from IF command Stuiart Excel Worksheet Functions 0 November 13th 06 02:11 AM
Net Send command trough VBA Michael Rhein Excel Programming 1 July 2nd 04 03:11 AM


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