Steve, did you get any answers on this I am curious as well.

Cody

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Drucker
Sent: Saturday, May 17, 2008 11:40 PM
To: discussion@acfug.org
Subject: [ACFUG Discuss] .NET Brain Teaser

I'm trying to work with the Microsoft OOXML SDK that allows you to modify
Office documents...

I've gotten this far -- the problem area is commented:


<cfset assembly =
"c:\coldfusion8\wwwroot\msoffice\Microsoft.Office.DocumentFormat.OpenXml.dll
">

<cfobject type="dotnet" 
                name="msoffice" 
 
class="Microsoft.Office.DocumentFormat.OpenXml.WordprocessingDocumentType" 
            assembly="#assembly#">

<cfobject type="dotnet" 
                name="msofficeloader" 
 
class="Microsoft.Office.DocumentFormat.OpenXml.Packaging.WordprocessingDocum
ent" 
            assembly="#assembly#">


<cfobject type=".NET" name="xdoc" class="System.Xml.XmlDocument">

<cftry>

        <cfset thedocument =
msofficeloader.Open("c:\coldfusion8\wwwroot\msoffice\walk\HelloWorld.docx",t
rue)>
        <cfset maindoc = thedocument.Get_MainDocumentPart()>
      <cfset stream = maindoc.GetStream()>
        <!--- code bombs out here, even though stream is a valid stream...or
so I think...
        <cfset xdoc.Load(stream)>
        --->
        <cfset thedocument.close()>
 <cfcatch type="any">
        <cfset thedocument.close()>
 </cfcatch>
</cftry> 


Regards,
Steve Drucker
CEO
Fig Leaf Software
Adobe / Google / WebSense / Paperthin  Premier Consulting and Training
Partners
http://www.figleaf.com
http://training.figleaf.com


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------





-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------



Reply via email to