Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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