Click here to Skip to main content
15,925,042 members
Home / Discussions / COM
   

COM

 
GeneralRe: WORD Pin
Steve S18-Nov-04 23:26
Steve S18-Nov-04 23:26 
GeneralRe: WORD Pin
Anonymous19-Nov-04 0:49
Anonymous19-Nov-04 0:49 
GeneralRe: WORD Pin
Steve S19-Nov-04 1:07
Steve S19-Nov-04 1:07 
GeneralRe: WORD Pin
Anonymous19-Nov-04 1:54
Anonymous19-Nov-04 1:54 
GeneralUrgent!!!How to pass an array in Event in ATL/COM DLL Pin
Akshay Dave16-Nov-04 18:36
Akshay Dave16-Nov-04 18:36 
GeneralMaking MFC Doc/view COM EXE Pin
Ro_land15-Nov-04 19:25
Ro_land15-Nov-04 19:25 
GeneralMaking MFC Doc/view COM EXE Pin
Ro_land15-Nov-04 19:25
Ro_land15-Nov-04 19:25 
Generalhtml->doc conversion Pin
DavidNohejl15-Nov-04 11:35
DavidNohejl15-Nov-04 11:35 
hi,
I am trying to convert (in my ASP.NET app) html document into .doc. My solution is to use automation and simply load html doc into word 2003, and then use document.SaveAs() to save it like word document. My problem is that after .doc is created, it is in wrong encoding ( or did word really produce sequence of random characters? ) I am not sure if problem is really with encoding, or if there is something else.
Let the code speak:
<br />
Object missing = System.Reflection.Missing.Value;<br />
			Object confirmConversions =false;<br />
			Object isReadOnly = false;<br />
			Object format = Word.WdOpenFormat.wdOpenFormatAuto;<br />
			Object encoding = missing;<br />
			Object visible = true;<br />
			Object noPrompt = true;<br />
			Object origFormat =missing;<br />
			Object saveChanges = false;<br />
			Object revert = false;<br />
			Object addToRecent = true;<br />
			Word.Document doc= null;<br />
			try<br />
			{<br />
				doc = oWord.Documents.Open(ref fileName, ref confirmConversions, ref isReadOnly, <br />
					ref addToRecent,ref missing, ref missing, ref revert, ref missing,ref missing,<br />
					ref format,<br />
					ref missing,<br />
					ref encoding,<br />
					ref missing, ref missing, ref missing, ref missing);<br />
				doc.Activate();<br />
				<br />
				Object newFileName=HTMLContractURL+".doc";<br />
				Object newFileFormat = Word.WdSaveFormat.wdFormatDocument;<br />
				Object readOnlyRecomended = false;<br />
				<br />
				Object lockComments = false;<br />
				Object saveFormsdata = false;<br />
				Object saveAsAOCLetter = false;<br />
				Object embedTT = false;<br />
				Object saveNativePF = true;<br />
				doc.SaveEncoding  = Microsoft.Office.Core.MsoEncoding.msoEncodingUTF8;<br />
				//doc.Save();<br />
				oWord.ActiveDocument.SaveAs(ref newFileName, ref newFileFormat,<br />
					ref lockComments, ref missing, ref addToRecent, ref missing,<br />
					ref readOnlyRecomended, ref embedTT, ref saveNativePF, ref saveFormsdata,<br />
					ref saveAsAOCLetter, ref encoding, ref missing, ref missing,<br />
					ref missing, ref missing);<br />


maybe oWord.SaveEncoding is bad, bt I added it WHILE debugging, so it wasn't working even without that line.
Since I need it done soon, I really appreciate any help.
Thanx a lot,
David 'DNH' Nohejl

Never forget: "Stay kul and happy" (I.A.)
GeneralHelp needed with extracting text and parsing word document with OLE objects Pin
Member 152066115-Nov-04 10:09
Member 152066115-Nov-04 10:09 
GeneralNeed help with WebBrowser events Pin
webboxxx115-Nov-04 5:32
webboxxx115-Nov-04 5:32 
GeneralDelphi creates empty propput procedures when it imports my DLL Pin
Gary Chapman15-Nov-04 4:59
Gary Chapman15-Nov-04 4:59 
GeneralAbnormally terminated client. Pin
sergeyv200212-Nov-04 10:57
sergeyv200212-Nov-04 10:57 
GeneralRe: Abnormally terminated client. Pin
Jörgen Sigvardsson12-Nov-04 11:05
Jörgen Sigvardsson12-Nov-04 11:05 
GeneralRe: Abnormally terminated client. Pin
Jörgen Sigvardsson13-Nov-04 1:00
Jörgen Sigvardsson13-Nov-04 1:00 
GeneralRe: Abnormally terminated client. Pin
Lim Bio Liong13-Nov-04 19:41
Lim Bio Liong13-Nov-04 19:41 
GeneralRe: Abnormally terminated client. Pin
sergeyv200215-Nov-04 3:19
sergeyv200215-Nov-04 3:19 
GeneralRe: Abnormally terminated client. Pin
Jörgen Sigvardsson16-Nov-04 9:53
Jörgen Sigvardsson16-Nov-04 9:53 
GeneralRe: Abnormally terminated client. Pin
Lim Bio Liong18-Nov-04 0:06
Lim Bio Liong18-Nov-04 0:06 
GeneralRe: Abnormally terminated client. Pin
Jörgen Sigvardsson18-Nov-04 0:10
Jörgen Sigvardsson18-Nov-04 0:10 
QuestionHow to estimate the CLSID of a manually loaded COM dll? Pin
karasu10-Nov-04 3:32
karasu10-Nov-04 3:32 
AnswerRe: How to estimate the CLSID of a manually loaded COM dll? Pin
vikramlinux15-Nov-04 0:20
vikramlinux15-Nov-04 0:20 
GeneralGet Parent folder from Full Qualified PIDL Pin
Marcus Spitzmiller9-Nov-04 8:18
Marcus Spitzmiller9-Nov-04 8:18 
GeneralCalling C++ COM with STL paramters from VB Pin
Member 15018497-Nov-04 18:17
Member 15018497-Nov-04 18:17 
GeneralRe: Calling C++ COM with STL paramters from VB Pin
Lim Bio Liong9-Nov-04 1:14
Lim Bio Liong9-Nov-04 1:14 
Generalcreating a com component from an IDL file Pin
vista274-Nov-04 11:49
vista274-Nov-04 11:49 

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.