V
VBA Coder
Does anyone know how I can issue a .TypeParagraph on my selection object
without having the font change to my Default Font?
I have a template where I am inserting text into the document. In my
Template, the entire document has been formatted to use Arial font.
However, my Default Font is "Times New Roman" for my Microsoft Word (Select
Format/Font from the main menu).
My sample code is below:
With Selection
' Enter some dummy text - the font is Arial at this point
.TypeText Text:="This font is Arial"
' Now issue a new paragraph - just like pressing the ENTER key
.TypeParagraph
' Now my Font is my default font - Times New Roman
.TypeText Text:="Now my font is Times New Roman, NOT Arial"
End With
Why is my font changing? If I go into blank document and start typing my
sample text with Arial font, and press the ENTER key, my font does not
change, why is it changing here when I issue the .TypeParagraph?
According to the following MSDN article on the TypeParagraph,
http://msdn.microsoft.com/library/d...y/en-us/office97/html/output/F1/D4/S5ADCE.asp,
"This method corresponds to the functionality of the ENTER key". Has
something changed from Office97 to Office 2000?
without having the font change to my Default Font?
I have a template where I am inserting text into the document. In my
Template, the entire document has been formatted to use Arial font.
However, my Default Font is "Times New Roman" for my Microsoft Word (Select
Format/Font from the main menu).
My sample code is below:
With Selection
' Enter some dummy text - the font is Arial at this point
.TypeText Text:="This font is Arial"
' Now issue a new paragraph - just like pressing the ENTER key
.TypeParagraph
' Now my Font is my default font - Times New Roman
.TypeText Text:="Now my font is Times New Roman, NOT Arial"
End With
Why is my font changing? If I go into blank document and start typing my
sample text with Arial font, and press the ENTER key, my font does not
change, why is it changing here when I issue the .TypeParagraph?
According to the following MSDN article on the TypeParagraph,
http://msdn.microsoft.com/library/d...y/en-us/office97/html/output/F1/D4/S5ADCE.asp,
"This method corresponds to the functionality of the ENTER key". Has
something changed from Office97 to Office 2000?