Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Ludwig Fischer   on Nov 04 In MS Office Category.

  
Question Answered By: Aran Boonliang   on Nov 04

i am not able to print to doc by using your code,
i have tried the below way but changes are reflecting in excel  instead of
word.....
Kindly check the below code and suggest
'***********************************************************************

Sub king()
fileNum = FreeFile()
cValStr = "Test case is passing"
Open "C:\Documents and Settings\naseemahmed_shaik\Desktop\try.doc" For Output
As fileNum
With Selection.Font
.Name = "Trebuchet MS"
..Size = 12
End With

Print #fileNum, cValStr '************************** here i want cValStr to be
printed in "Trebuchet MS"***************
Close #fileNum
Close #try
End Sub

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on How to set font while writing to MS word Or get search suggestion and latest updates.


Tagged: