CarlyChemE
11-11-2008, 07:12 AM
Hello, I am new to this forum as well as new to coding in word VBA. This is a part word and part excel question. I am controlling a word document from excel. Before i close the word document i want to reset the font size of the numbering list to 16. In word, the code looks like this:
Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=ListGalleries(wdNumberGallery).ListTemplates(2), ContinuePreviousList:=True, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:=wdWord10ListBehavior
but when the above code is in excel it gives me an error, even when i put "docword.application" (docword is the variable for the word document) before "selection." The error is:
Run Time Error '462'
The remote server machine does not exist or is unavailable
anyone know how i can fix this?
Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=ListGalleries(wdNumberGallery).ListTemplates(2), ContinuePreviousList:=True, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:=wdWord10ListBehavior
but when the above code is in excel it gives me an error, even when i put "docword.application" (docword is the variable for the word document) before "selection." The error is:
Run Time Error '462'
The remote server machine does not exist or is unavailable
anyone know how i can fix this?