Automation word Dokument öffnen
-
Hallo Leute
Ich möchte mittel Automation (late binding) ein bestehendes Word-Dokument
offnen. für ein neues Dokument sieht de code so aus:CoInitialize(NULL); LPDISPATCH pdispWord; ::CreateObject(OLESTR("Word.Basic"), &pdispWord); Invoke(pdispWord, DISPATCH_METHOD, NULL, NULL, NULL, OLESTR("AppShow"), NULL); Invoke(pdispWord, DISPATCH_METHOD, NULL, NULL, NULL, OLESTR("NewFileDefault"),NULL);Ich meine mit Wordbasic ging das über fileopen("date.doc")

Wie gebe ichg das nun hier ein ? habe schon alles versucht
und googeln hat auch nichts gebracht.Wer weis Rat ?
Danke und Gruß
Linus
-
Verwende doch einfach CoGetObject!
-
If you use my extended InvHelp, you can simply call
GetCOMObject instead of CreateObject
http://blog.kalmbachnet.de/?postid=63
Siehe auch:
http://groups.google.de/group/microsoft.public.de.vc/browse_thread/thread/417701fd45b41c0a