Click here to Skip to main content
15,906,463 members
Home / Discussions / COM
   

COM

 
GeneralRe: BHO Pin
manuboy27-Jul-03 12:12
manuboy27-Jul-03 12:12 
GeneralGetting selected folder in a namespace extension Pin
Mike Hartway25-Jul-03 14:28
Mike Hartway25-Jul-03 14:28 
QuestionHow to SendMessage to a windowless Ctrl Pin
ray_li25-Jul-03 5:41
ray_li25-Jul-03 5:41 
AnswerRe: How to SendMessage to a windowless Ctrl Pin
John M. Drescher25-Jul-03 6:54
John M. Drescher25-Jul-03 6:54 
AnswerRe: How to SendMessage to a windowless Ctrl Pin
MartinOrtiz31-Jul-03 12:24
MartinOrtiz31-Jul-03 12:24 
GeneralCOM+ / MSMQ Pin
sam_jr24-Jul-03 17:05
sam_jr24-Jul-03 17:05 
GeneralRe: COM+ / MSMQ Pin
ICBM25-Jul-03 15:02
ICBM25-Jul-03 15:02 
GeneralClosing document in Word under Automation Pin
Dave Loeser24-Jul-03 4:52
Dave Loeser24-Jul-03 4:52 
I'm using Word Automation (using C++ here) as an out of proc exe to Find and Replace text within documents. When I create an instance of Word I would prefer to keep that instance open and then open, search/replace, close and repeat until I am finished with all documents and then quit the word application instance.

I have this working but I have an odd (or maybe it is a common) problem. When I close the document, Word becomes visible. Here's how I am closeing the document.

void CMSWord9Automation::CloseDoc()
{
	try
	{
		if(m_pOpenDoc) // Word::_DocumentPtr
		{
			//m_pWord->Visible = VARIANT_FALSE; // Does not work
			m_pWord->Documents->Close(
				&_variant_t(Word::wdDoNotSaveChanges),
				&_variant_t(vtMissing),
				&_variant_t(VARIANT_FALSE));

			//m_pWord->Visible = VARIANT_FALSE; // This resets word to invisible but isn't really the desired approach
			m_pOpenDoc.Release();
		}
	}
	catch(_com_error& ComError) 
	{
		DumpComError(ComError);
	}
}


I'm looking for any information on how to stop Word from displaying when I close the opened document.

Thanks,

Dave Dak Lozar Loeser
When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible. - MSDN:C# Programmer's Reference
Generalword automation Pin
Jason Henderson23-Jul-03 10:06
Jason Henderson23-Jul-03 10:06 
GeneralArrays of IUnknown.. Pin
ICBM22-Jul-03 0:27
ICBM22-Jul-03 0:27 
GeneralRe: Arrays of IUnknown.. Pin
valikac22-Jul-03 8:56
valikac22-Jul-03 8:56 
GeneralRe: Arrays of IUnknown.. Pin
first_sandy25-Jul-03 3:40
first_sandy25-Jul-03 3:40 
GeneralRe: Arrays of IUnknown.. Pin
ICBM25-Jul-03 13:44
ICBM25-Jul-03 13:44 
QuestionHow to prevent binding a Type library to a ATL Attributed DLL ? Pin
talhalfon21-Jul-03 22:39
talhalfon21-Jul-03 22:39 
GeneralIE plugin Pin
nettrinity20-Jul-03 17:04
nettrinity20-Jul-03 17:04 
GeneralRe: IE plugin Pin
ashxly21-Jul-03 18:41
ashxly21-Jul-03 18:41 
GeneralRe: IE plugin Pin
nettrinity21-Jul-03 21:35
nettrinity21-Jul-03 21:35 
GeneralRe: IE plugin Pin
ashxly21-Jul-03 18:41
ashxly21-Jul-03 18:41 
GeneralOCX issue Pin
carb18-Jul-03 9:58
carb18-Jul-03 9:58 
GeneralGetting an Explorer history item URL Pin
yarp18-Jul-03 0:06
yarp18-Jul-03 0:06 
GeneralCOM Support in new Windows OS Pin
Paul Roullier17-Jul-03 2:58
Paul Roullier17-Jul-03 2:58 
GeneralRe: COM Support in new Windows OS Pin
Michael P Butler22-Jul-03 4:38
Michael P Butler22-Jul-03 4:38 
GeneralDisplay name of components Pin
first_sandy16-Jul-03 21:14
first_sandy16-Jul-03 21:14 
GeneralRe: Display name of components Pin
Vi216-Jul-03 21:23
Vi216-Jul-03 21:23 
GeneralRe: Display name of components Pin
first_sandy16-Jul-03 22:27
first_sandy16-Jul-03 22:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.