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: 1
Default Cannot destroy Word Object in Excel


I'm using a Word object to write information to the registry from within
an Excel Macro (this is in order to generate a PDF file using CutePDF).
Everything works fine but the Winword object is still resident in
memory.

The code is as follows:

Function SetRegKeys(Section as String, Key as String, KeyValue) as
Boolean
Dim wrd As Word.Application
SetRegistrySetting = False
Set wrd = New Word.Application
On Error Resume Next
wrd.System.PrivateProfileString("", Section, Key) = CStr(KeyValue)
On Error GoTo 0
Set wrd = Nothing
SetRegistrySetting = True
End Function

It's probably self evident but I should add that I am no VBA expert.

Thanks


--
dai50
------------------------------------------------------------------------
dai50's Profile: http://www.excelforum.com/member.php...o&userid=32741
View this thread: http://www.excelforum.com/showthread...hreadid=556470

 
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
excel object linked to word will not add sums in word Robin Excel Discussion (Misc queries) 0 March 31st 09 11:10 PM
PLS HELP! Excel imbedded object in Word dee Excel Discussion (Misc queries) 0 March 14th 07 01:21 PM
word object in excel daron tan Excel Programming 0 September 21st 05 10:27 AM
Excel object - save as csv from Word? Chuck Excel Programming 4 December 13th 04 02:51 PM
TO MODIFY A EXCEL OBJECT FROM WORD USING VBA Sandra Bonilla Excel Programming 1 November 10th 04 03:59 AM


All times are GMT +1. The time now is 08:15 PM.

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"