Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel object linked to word will not add sums in word | Excel Discussion (Misc queries) | |||
PLS HELP! Excel imbedded object in Word | Excel Discussion (Misc queries) | |||
word object in excel | Excel Programming | |||
Excel object - save as csv from Word? | Excel Programming | |||
TO MODIFY A EXCEL OBJECT FROM WORD USING VBA | Excel Programming |