D
David Thielen
This code has worked forever:
object fieldType = WdFieldType.wdFieldAutoTextList;
object fieldText = "\"<xyDate>\" \\t \"<wr:chart style='default'
graph0-data0-select='${data}/@day' graph0-data1-select='${data}/@num'
graph0-data1-type='number' graph0-rows-select='${series}/elem'
graph0-select='/data/xyDate' graph0-series-select='${series}/@name'
graph0-type='column:clustered'/>\"";
object preserveFormatting = false;
Field fld = app.NativeDocument.Fields.Add(rng, ref fieldType, ref
fieldText, ref preserveFormatting);
But now I get a:
System.Runtime.InteropServices.COMException occurred
HelpLink="C:\\Program Files\\Microsoft
Office\\Office12\\1033\\WDMAIN11.CHM#37373"
Message="This command is not available."
Source="Microsoft Word"
ErrorCode=-2146823683
StackTrace:
at Microsoft.Office.Interop.Word.Fields.Add(Range Range,
Object& Type, Object& Text, Object& PreserveFormatting)
at
AutoTag2010.net.windward.autotag.word.WordTagHandler.WriteTag(WordTagLocation
tag, Image picture, ChartDataSet chartData) in
C:\src\version9\AutoTag\AutoTag2010\net\windward\autotag\word\WordTagHandler.cs:line
1388
InnerException:
Any idea why?
thanks - dave
david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardreports.com/film.htm
object fieldType = WdFieldType.wdFieldAutoTextList;
object fieldText = "\"<xyDate>\" \\t \"<wr:chart style='default'
graph0-data0-select='${data}/@day' graph0-data1-select='${data}/@num'
graph0-data1-type='number' graph0-rows-select='${series}/elem'
graph0-select='/data/xyDate' graph0-series-select='${series}/@name'
graph0-type='column:clustered'/>\"";
object preserveFormatting = false;
Field fld = app.NativeDocument.Fields.Add(rng, ref fieldType, ref
fieldText, ref preserveFormatting);
But now I get a:
System.Runtime.InteropServices.COMException occurred
HelpLink="C:\\Program Files\\Microsoft
Office\\Office12\\1033\\WDMAIN11.CHM#37373"
Message="This command is not available."
Source="Microsoft Word"
ErrorCode=-2146823683
StackTrace:
at Microsoft.Office.Interop.Word.Fields.Add(Range Range,
Object& Type, Object& Text, Object& PreserveFormatting)
at
AutoTag2010.net.windward.autotag.word.WordTagHandler.WriteTag(WordTagLocation
tag, Image picture, ChartDataSet chartData) in
C:\src\version9\AutoTag\AutoTag2010\net\windward\autotag\word\WordTagHandler.cs:line
1388
InnerException:
Any idea why?
thanks - dave
david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com
Cubicle Wars - http://www.windwardreports.com/film.htm