Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Paste in WinWord, problems with several processes

When using the following code, winword remain as an process in task-manager.
That become a problem when I run the macro again and again. I had hundereds
of processes running.
_____________________________________
Dim wdbasic As Object
Set wdbasic = CreateObject("word.basic")
With wdbasic
.FileOpen "I:\PROTOKOL\" & yyyy & "\" & inv$ & b$ & "." & yy & iLOOP
& ".doc"
.EditPaste
.FileSave
.fileclose
End With
Set wdbasic = Nothing
______________________________________
any clue ?
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Paste in WinWord, problems with several processes

Why are you using
CreateObject("word.basic")
instead of
CreateObject("Word.Application")???

For that matter, if you are going to open and work with a specific Word doc,
then why not something like:

Dim WD As Object
Dim doc As Object
Dim dName As String
Set WD = CreateObject("Word.Application")
dName = "I:\PROTOKOL\" & yyyy & "\" & inv$ & b$ & "." & yy & iLOOP & ".doc"
Set doc = WD.Documents.Add dName
With doc
.EditPaste
.FileSave
.fileclose
End With

WD.Quit
Set doc = Nothing
Set WD = Nothing

(Note: pieced together from previous macros; not tested like this)
Ed

"lasse g" <lasse wrote in message
...
When using the following code, winword remain as an process in

task-manager.
That become a problem when I run the macro again and again. I had

hundereds
of processes running.
_____________________________________
Dim wdbasic As Object
Set wdbasic = CreateObject("word.basic")
With wdbasic
.FileOpen "I:\PROTOKOL\" & yyyy & "\" & inv$ & b$ & "." & yy &

iLOOP
& ".doc"
.EditPaste
.FileSave
.fileclose
End With
Set wdbasic = Nothing
______________________________________
any clue ?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default Paste in WinWord, problems with several processes

Hi Lasse,

When using the following code, winword remain as an

process in task-manager.
That become a problem when I run the macro again and

again. I had hundereds
of processes running.
any clue ?
.



Well, I know that the same is happening when opening and
closing Outlook... maybe its a whole Office task that
closed programs are not unloaded from the task manager...

This is no solution for your problem, I know, but I just
want to give "my two cents" ;o)

Best

Markus
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
Processes in one cell jai Excel Discussion (Misc queries) 2 January 25th 08 05:06 PM
Multiple Excel Processes MDW Excel Programming 2 September 7th 04 05:53 PM
hiding processes marta Excel Programming 2 July 23rd 04 05:35 PM
Open Winword from Excel Robert Christie[_3_] Excel Programming 2 February 14th 04 04:27 AM
Open Winword-file using a Excel 97 VBA macro Dominik Scheck Excel Programming 4 August 5th 03 02:35 AM


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

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"