Picture opening as a doc??????????????

T

TRM

I don't even know how to search on this one! I'm quite confused. Following
is a code snippit. It has opened a template and updated some doc variables
and name then saves it. The template contains a picture. When I insert the
"oDoc.SaveAs strDocName"... word opens up to a window for editing the picture
(on top), and a window for the new doc. Prior to adding the save, only one
window would open and it was for the new doc. HELP!! Thanks!

With oApp
.Options.DefaultFilePath(wdDocumentsPath) = ROOT_PATH & strSavDir
.Selection.Goto wdGoToBookmark, Name:="WrittenBy"
.Selection.Text = Author
.Selection.Goto wdGoToBookmark, Name:="StartHere"
oDoc.SaveAs strDocName
.Visible = True
End With
 
W

Word Heretic

G'day TRM said:
.Selection.Goto wdGoToBookmark, Name:="WrittenBy"
.Selection.Text = Author

can all be replaced with

ActiveDocument.Bookmarks("WrittenBy").Range.text = Author

Then check your StartHere is not wrapped around the picture.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


TRM reckoned:
 
T

TRM

Thank you... I've replaced that code. I did rearrange the order of the save
and it seems to have worked!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top