Is there a way to change the style of text being entered into Word from the default "Normal" to "No Spacing". I'm using the ActiveXAutomation Word.vee.
Set App = CreateObject("Word.Application"); App.Visible = TRUE; Set Doc = App.Documents.Add(); Doc.Activate(); Set Wnd = App.ActiveWindow; Set Sel = App.Selection; Wnd.View.Type = 3; // wdPageView in Word97, wdPrintView in Word2000 Sel.TypeText("*** Test Results ***\n"); Sel.TypeText("*** Test Results ***\n"); sel.Style="No Spacing"; Sel.TypeText("*** Test Results ***\n"); Sel.TypeText("*** Test Results ***\n");
Hi, SSchmitt. Have you ever found out any solutions to your problem? I am looking for the way to change the style of text being entered into Word from the default "Normal" to "No Spacing". But I'm not using the ActiveXAutomation Word.vee. I wonder whether I need to ask some 3rd party [url=http://www.yiigo.com/guides/vbnet/how-to-process-word.shtml]Word processing[/url] plugins for help? And is that more convenient to using the manual [url=http://www.yiigo.com/guides/vbnet/how-to-start-word.shtml]Word Doc SDKs[/url] which can be customized by users according to our own favors? I am totally a green hand on this field. Any suggestion will be appreciated. Thanks in advance.
App.Visible = TRUE;
Set Doc = App.Documents.Add();
Doc.Activate();
Set Wnd = App.ActiveWindow;
Set Sel = App.Selection;
Wnd.View.Type = 3; // wdPageView in Word97, wdPrintView in Word2000
Sel.TypeText("*** Test Results ***\n");
Sel.TypeText("*** Test Results ***\n");
sel.Style="No Spacing";
Sel.TypeText("*** Test Results ***\n");
Sel.TypeText("*** Test Results ***\n");
Hope this helps.