Memo/2004-05-09
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
#contents
*Excel関連情報 [#i71577ce]
**サンプルコード [#j86d433c]
***各シートをブックに保存する [#v89462b0]
Sub Sheet2Book()
Dim i
Dim nCount
Dim strBookName
strBookName = "E:\home\edu\excel\sheet2book\test_"
nCount = Sheets.Count
Dim strSheetName
For i = 1 To nCount
strSheetName = Sheets(i).Name
Sheets(i).Select
Sheets(i).Copy
ActiveWorkbook.SaveAs Filename:=strBookName & st...
ActiveWindow.Close
Next
End Sub
*Word関連情報 [#b4985747]
**サンプルコード [#v0996362]
***各ページを文書に保存する [#h7cef07c]
Sub page2doc()
Dim i
Dim nCount
Dim strDocName
strDocName = "E:\home\edu\word\test\test_page_"
nCount = ActiveDocument.Content.Information(wdNumber...
For i = 1 To nCount
Selection.GoTo What:=wdGoToPage, Which:=wdGoToNe...
Selection.GoTo What:=wdGoToBookmark, Name:="\page"
Selection.Copy
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveDown Unit:=wdParagraph, Count:=1, ...
ActiveDocument.SaveAs FileName:=strDocName & i
ActiveWindow.Close
Next
End Sub
//#comment
終了行:
#contents
*Excel関連情報 [#i71577ce]
**サンプルコード [#j86d433c]
***各シートをブックに保存する [#v89462b0]
Sub Sheet2Book()
Dim i
Dim nCount
Dim strBookName
strBookName = "E:\home\edu\excel\sheet2book\test_"
nCount = Sheets.Count
Dim strSheetName
For i = 1 To nCount
strSheetName = Sheets(i).Name
Sheets(i).Select
Sheets(i).Copy
ActiveWorkbook.SaveAs Filename:=strBookName & st...
ActiveWindow.Close
Next
End Sub
*Word関連情報 [#b4985747]
**サンプルコード [#v0996362]
***各ページを文書に保存する [#h7cef07c]
Sub page2doc()
Dim i
Dim nCount
Dim strDocName
strDocName = "E:\home\edu\word\test\test_page_"
nCount = ActiveDocument.Content.Information(wdNumber...
For i = 1 To nCount
Selection.GoTo What:=wdGoToPage, Which:=wdGoToNe...
Selection.GoTo What:=wdGoToBookmark, Name:="\page"
Selection.Copy
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveDown Unit:=wdParagraph, Count:=1, ...
ActiveDocument.SaveAs FileName:=strDocName & i
ActiveWindow.Close
Next
End Sub
//#comment
ページ名: