Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

where are the vb experts, i need help


  • Please log in to reply

#1
gixxerboy

gixxerboy

    New Member

  • Member
  • Pip
  • 1 posts
;)
I use this code to creat a word doc using the visual basic

private sub writeinword ()
'code started
Dim myWord As Object
Set myWord = GetObject("", "Word.Basic")
myWord.AppMaximize ("Microsoft Word")
myWord.FileNew
myWord.FormatFont Points:="14", Font:="Arial", Bold:=1
myWord.formatparagraph Alignment:=0
myWord.Insert "Hello !"
myWord.Insertpara
myWord.Insert " Thats Me"
myWord.Insertpara
myWord.Insertpara
myWord.Insert "GoodBye : ) "
'code ended
end sub


but i don't Know why the font and it's size can't be changed :tazz:
and i didn't know the code to modify the margins ;)
so if any one know anything about this problem plz replay this topic
  • 0

Advertisements


#2
paper

paper

    Member

  • Member
  • PipPip
  • 48 posts
gixxerboy,

I am not an expert in Word, but I have just tested your code and found it can change the font size.
Perhaps, you can try

myWord.FormatFont Points:="24", Font:="Arial", Bold:=1
myWord.Insert "Hello !"
myWord.Insertpara
myWord.FormatFont Points:="14", Font:="Arial", Bold:=1
myWord.Insert " Thats Me"

to see the difference.
  • 0

#3
stu_design

stu_design

    Member

  • Member
  • PipPipPip
  • 217 posts
you can also changethe font by inserting the name of the font u wanna use

myWord.FormatFont Points:="14", Font:="Times New Roman", Bold:=1
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP