Re: $$Excel-Macros$$ VBA Help:Excel table copy paste in word (with formatting as it)

2013-01-27 Thread amar takale
Hi minimaster,
I put into a normal code module but not work Pls send me above
attached report Name Excel file with that code.I dont know why?
Pls.
Amar

On Mon, Jan 28, 2013 at 12:53 PM, minimaster
 wrote:
> Amar,
> the code I posted must be put into a normal code module, not into the Sheet
> object.
> kind regards
>
> --
> Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
> not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To post to this group, send email to excel-macros@googlegroups.com.
> To unsubscribe from this group, send email to
> excel-macros+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: $$Excel-Macros$$ VBA Help:Excel table copy paste in word (with formatting as it)

2013-01-27 Thread minimaster
Amar, 
the code I posted must be put into a normal code module, not into the Sheet 
object.
kind regards

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: $$Excel-Macros$$ VBA Help:Excel table copy paste in word (with formatting as it)

2013-01-25 Thread amar takale
Dear,
Price,Rajan,Hilary,Noorin,Ashish..& All Expert,
Pls look this matter for solution.
I got answer 90% but 10% is confused why Excel table not copy paste in word.
Pls try
Regards
Amar

On Fri, Jan 25, 2013 at 12:53 PM, amar takale  wrote:
> Dear hartmut,
> It not work,it show error.I attached print shot Pls see it & give me
> suggestion.If possible send me above attached excel (Report) with code
> with solution.I will try more.but no sucess.
> I will send other two code in word file It is also not work,something
> is small mistek But I cant understand Pls see it also
>
> Regards
> Amar
>
> On Fri, Jan 25, 2013 at 12:38 PM, minimaster
>  wrote:
>> Hi Amar,
>> let me know whether it works.
>>
>> Option Explicit
>> Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As
>> Long) As Integer
>>
>> Sub CopySelectionIntoWordDoc()'Optional titel2 As String)
>> ''' COPY ONE OR MULTIPLE SELECTED EXCEL CHARTS OR SELECTED AREAS INTO Word
>> ' In the "tools" menu of the Visual Basic Editor set a reference to
>> ' Microsoft Word Object Library
>> Dim sh As Object
>> Dim i As Integer
>> Dim titel As String
>> Dim new_page As Boolean
>> Dim lndscape As Boolean
>> Dim PasteSuccess As Boolean
>> Dim titel2 As String
>> Dim pID As Integer
>> Dim shType As Integer
>>
>> ' In case the shift key is pressed down while starting the macro
>> ' the selection will be posted into a new page.
>> new_page = Key_pressed(vbKeyShift)
>>
>> ' In case the Control key is pressed down while starting the macro
>> ' the selection will be posted on a new page in landscape format
>> lndscape = Key_pressed(vbKeyControl)
>>
>>On Error Resume Next
>> If ActiveWorkbook Is Nothing Then
>> MsgBox "Open workbook and try again!"
>> ElseIf Selection Is Nothing Then
>> pID = MsgBox("Make a selection and try again!", vbInformation,
>> "Nothing selected!")
>> Else
>> Dim WordApp As Object ' Word.Application
>> Set WordApp = getWord()
>>
>>Excel.Application.ActiveWindow.Activate
>> On Error GoTo exitsub
>> If Not ActiveChart Is Nothing Then' one chart is selected
>> On Error Resume Next
>> If titel2 <> "" Then
>> titel = titel2
>> Else
>> titel = assembleTitel
>> End If
>> On Error GoTo 0
>> ' Copy chart as a picture
>> Application.ActiveChart.CopyPicture Appearance:=xlScreen,
>> Size:=xlScreen, Format:=xlPicture
>> PasteSuccess = PasteSelection(new_page, lndscape, titel)
>> Else
>> On Error Resume Next
>> i = Selection.ShapeRange.Count   'if there is no error multiple
>> charts are selected
>> If Err.Number = 0 Then   ' err.number is zero because we have a
>> multiple selection
>> ' err.Clear
>> On Error GoTo 0
>> For Each sh In Selection.ShapeRange
>> shType = sh.Type
>> If shType = msoChart Or shType = msoPicture Then
>> sh.Select
>> If shType = msoChart Then
>> Application.ActiveChart.CopyPicture
>> Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
>> Else
>> Selection.Copy
>> End If
>> titel = ""
>> On Error Resume Next
>> If titel2 <> "" Then
>> titel = titel2
>> Else
>> titel = assembleTitel
>> End If
>> On Error GoTo 0
>> PasteSuccess = PasteSelection(new_page, lndscape,
>> titel)
>> End If
>> Next
>> Else   ' in case no charts we might have one or more cell
>> selections
>> For i = 1 To Selection.Areas.Count
>> If Selection.Areas(i).Cells.Count < 2 Then
>> If MsgBox("You have selected a single cell." &
>> Chr(10) & _
>>   "Should this single cell be copied to
>> Word?", vbYesNo) = vbNo Then
>> GoTo nextone
>> End If
>> End If
>> On Error GoTo 0
>> Selection.Areas(i).CopyPicture Appearance:=xlScreen,
>> Format:=xlPicture
>> PasteSuccess = PasteSelection(new_page, lndscape, titel)
>> Application.CutCopyMode = False
>> nextone:
>> Next i
>> End If
>> End If
>> If PasteSuccess Then getWord.Activate
>> End If
>> exitsub:
>> End Sub
>>
>> Private Function PasteSelection(newPage As Boolean, lndscape As Boolean,
>> sli

Re: $$Excel-Macros$$ VBA Help:Excel table copy paste in word (with formatting as it)

2013-01-24 Thread amar takale
Hi All
Anybody tell me to answer.

On Wed, Jan 23, 2013 at 4:21 PM, amar takale  wrote:
> Sir where is set code.it is replace old code or adjust on it.pls if
> possible send me full code or sheet  example which I attached above
> (Report).
> Thanks very much
>
> On Wed, Jan 23, 2013 at 3:01 AM, bpascal123  wrote:
>> Set ws = wb.Worksheets("Feuil")
>> to
>> Set ws = wb.activesheet
>>
>> run the code from the excel sheet the table is located
>> else you can replace "Feuil" with the name of the sheet where the table is
>> located, most likely "sheet1"
>>
>> btw Feuil means Sheet in French...
>>
>> --
>> Join official Facebook page of this forum @
>> https://www.facebook.com/discussexcel
>>
>> FORUM RULES
>>
>> 1) Use concise, accurate thread titles. Poor thread titles, like Please
>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
>> not get quick attention or may not be answered.
>> 2) Don't post a question in the thread of another member.
>> 3) Don't post questions regarding breaking or bypassing any security
>> measure.
>> 4) Acknowledge the responses you receive, good or bad.
>> 5) Jobs posting is not allowed.
>> 6) Sharing copyrighted material and their links is not allowed.
>>
>> NOTE : Don't ever post confidential data in a workbook. Forum owners and
>> members are not responsible for any loss.
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "MS EXCEL AND VBA MACROS" group.
>> To post to this group, send email to excel-macros@googlegroups.com.
>> To unsubscribe from this group, send email to
>> excel-macros+unsubscr...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>>
>>

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.




Re: $$Excel-Macros$$ VBA Help:Excel table copy paste in word (with formatting as it)

2013-01-23 Thread amar takale
Sir where is set code.it is replace old code or adjust on it.pls if
possible send me full code or sheet  example which I attached above
(Report).
Thanks very much

On Wed, Jan 23, 2013 at 3:01 AM, bpascal123  wrote:
> Set ws = wb.Worksheets("Feuil")
> to
> Set ws = wb.activesheet
>
> run the code from the excel sheet the table is located
> else you can replace "Feuil" with the name of the sheet where the table is
> located, most likely "sheet1"
>
> btw Feuil means Sheet in French...
>
> --
> Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
> not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To post to this group, send email to excel-macros@googlegroups.com.
> To unsubscribe from this group, send email to
> excel-macros+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>
>

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.




Re: $$Excel-Macros$$ VBA Help:Excel table copy paste in word (with formatting as it)

2013-01-22 Thread bpascal123
Set ws = wb.Worksheets("Feuil")
to
Set ws = wb.activesheet

run the code from the excel sheet the table is located
else you can replace "Feuil" with the name of the sheet where the table is 
located, most likely "sheet1"

btw Feuil means Sheet in French...

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.




Re: $$Excel-Macros$$ VBA Help:Excel table copy paste in word (with formatting as it)

2013-01-21 Thread amar takale
Hi vjayajithi,
Can you Solved my Query.as per you saving, need to select tools
->refrence-> microsoft word.I select that tools but get error
(Subscript out of range).Pls Suggest me Answer.I am waiting for
solution
Regards
Amar

On Sat, Jan 19, 2013 at 12:36 PM, vijayajith VA  wrote:
> need to select tools ->refrence-> microsoft word .. i am working on it ...&
> will get back to you soon..
>
>
> On Sat, Jan 19, 2013 at 12:04 PM, amar takale  wrote:
>>
>> Dear vjayajithi,
>> Thanks for reply.I have attached sheet.If I used code compile error.I
>> will send printshot with Example File.Pls see it.I used Excel 2003.
>> I thinking VBA code is making as I change table range only & paste it
>> word (with formatting) bcos if I used it diffrent table in Excel.
>> Regards
>> Amar
>>
>> On Sat, Jan 19, 2013 at 11:39 AM, vijayajith VA 
>> wrote:
>> > Chage yourworksheet name .. as per your worksheet
>> >
>> >
>> > On Sat, Jan 19, 2013 at 11:38 AM, vijayajith VA
>> > 
>> > wrote:
>> >>
>> >> HI Amar,
>> >> use below code..or Could you just share your workbook..
>> >>
>> >> Sub method1()
>> >> Application.ScreenUpdating = False
>> >> Application.Calculation = xlCalculationManual
>> >>
>> >> Dim wb As Workbook
>> >> Dim ws As Worksheet
>> >> Set wb = ThisWorkbook
>> >> Set ws = wb.Worksheets("Feuil")
>> >> Dim rng As Range
>> >> Dim wdApp As New Word.Application
>> >> Dim wdDoc As Word.Document
>> >> Dim t As Word.Range
>> >> Dim myWordFile As String
>> >>
>> >> myWordFile = ThisWorkbook.Path & "\Export2Word1.dot"
>> >> Set rng = ws.Range(ws.Cells(1, 1), ws.Cells(21, 5))
>> >> rng.Copy
>> >> Set wdDoc = wdApp.Documents.Add(myWordFile)
>> >> Set t = wdDoc.Content
>> >> t.Paste
>> >> wdApp.Visible = True
>> >> wdApp.Activate
>> >> Application.ScreenUpdating = True
>> >> Application.Calculation = xlCalculationAutomatic
>> >> End Sub
>> >>
>> >>
>> >>
>> >> On Sat, Jan 19, 2013 at 10:32 AM, amar takale 
>> >> wrote:
>> >>>
>> >>> Dear All Champs,
>> >>> Can anybody tell me first it is possible Excel table copy paste in
>> >>> word (with formatting as it)?If yes how to do it.I am VBA learner only
>> >>> not champ. So pls If anyone champ have Idea how to do it,suggest VBA
>> >>> code then I click Button only & automatically Excel Table copy paste
>> >>> in Word.I think it is fantastic shortcut & save more time.
>> >>>
>> >>> Thanks a lot in Advance.
>> >>>
>> >>> Best Regards,
>> >>>
>> >>> Amar
>> >>>
>> >>> --
>> >>> Join official Facebook page of this forum @
>> >>> https://www.facebook.com/discussexcel
>> >>>
>> >>> FORUM RULES
>> >>>
>> >>> 1) Use concise, accurate thread titles. Poor thread titles, like
>> >>> Please
>> >>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need
>> >>> Advice will
>> >>> not get quick attention or may not be answered.
>> >>> 2) Don't post a question in the thread of another member.
>> >>> 3) Don't post questions regarding breaking or bypassing any security
>> >>> measure.
>> >>> 4) Acknowledge the responses you receive, good or bad.
>> >>> 5) Jobs posting is not allowed.
>> >>> 6) Sharing copyrighted material and their links is not allowed.
>> >>>
>> >>> NOTE  : Don't ever post confidential data in a workbook. Forum owners
>> >>> and
>> >>> members are not responsible for any loss.
>> >>> ---
>> >>> You received this message because you are subscribed to the Google
>> >>> Groups
>> >>> "MS EXCEL AND VBA MACROS" group.
>> >>> To post to this group, send email to excel-macros@googlegroups.com.
>> >>> To unsubscribe from this group, send email to
>> >>> excel-macros+unsubscr...@googlegroups.com.
>> >>> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>> >>>
>> >>>
>> >>
>> >
>> > --
>> > Join official Facebook page of this forum @
>> > https://www.facebook.com/discussexcel
>> >
>> > FORUM RULES
>> >
>> > 1) Use concise, accurate thread titles. Poor thread titles, like Please
>> > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
>> > will
>> > not get quick attention or may not be answered.
>> > 2) Don't post a question in the thread of another member.
>> > 3) Don't post questions regarding breaking or bypassing any security
>> > measure.
>> > 4) Acknowledge the responses you receive, good or bad.
>> > 5) Jobs posting is not allowed.
>> > 6) Sharing copyrighted material and their links is not allowed.
>> >
>> > NOTE : Don't ever post confidential data in a workbook. Forum owners and
>> > members are not responsible for any loss.
>> > ---
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "MS EXCEL AND VBA MACROS" group.
>> > To post to this group, send email to excel-macros@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > excel-macros+unsubscr...@googlegroups.com.
>> > Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>> >
>> >
>>
>> --
>> Join official Facebook page of this forum @
>> https://www.facebook.com/discussexcel
>>
>> FORUM RULES
>>
>> 1) Use

Re: $$Excel-Macros$$ VBA Help:Excel table copy paste in word (with formatting as it)

2013-01-18 Thread vijayajith VA
need to select tools ->refrence-> microsoft word .. i am working on it ...&
will get back to you soon..

On Sat, Jan 19, 2013 at 12:04 PM, amar takale  wrote:

> Dear vjayajithi,
> Thanks for reply.I have attached sheet.If I used code compile error.I
> will send printshot with Example File.Pls see it.I used Excel 2003.
> I thinking VBA code is making as I change table range only & paste it
> word (with formatting) bcos if I used it diffrent table in Excel.
> Regards
> Amar
>
> On Sat, Jan 19, 2013 at 11:39 AM, vijayajith VA 
> wrote:
> > Chage yourworksheet name .. as per your worksheet
> >
> >
> > On Sat, Jan 19, 2013 at 11:38 AM, vijayajith VA  >
> > wrote:
> >>
> >> HI Amar,
> >> use below code..or Could you just share your workbook..
> >>
> >> Sub method1()
> >> Application.ScreenUpdating = False
> >> Application.Calculation = xlCalculationManual
> >>
> >> Dim wb As Workbook
> >> Dim ws As Worksheet
> >> Set wb = ThisWorkbook
> >> Set ws = wb.Worksheets("Feuil")
> >> Dim rng As Range
> >> Dim wdApp As New Word.Application
> >> Dim wdDoc As Word.Document
> >> Dim t As Word.Range
> >> Dim myWordFile As String
> >>
> >> myWordFile = ThisWorkbook.Path & "\Export2Word1.dot"
> >> Set rng = ws.Range(ws.Cells(1, 1), ws.Cells(21, 5))
> >> rng.Copy
> >> Set wdDoc = wdApp.Documents.Add(myWordFile)
> >> Set t = wdDoc.Content
> >> t.Paste
> >> wdApp.Visible = True
> >> wdApp.Activate
> >> Application.ScreenUpdating = True
> >> Application.Calculation = xlCalculationAutomatic
> >> End Sub
> >>
> >>
> >>
> >> On Sat, Jan 19, 2013 at 10:32 AM, amar takale 
> >> wrote:
> >>>
> >>> Dear All Champs,
> >>> Can anybody tell me first it is possible Excel table copy paste in
> >>> word (with formatting as it)?If yes how to do it.I am VBA learner only
> >>> not champ. So pls If anyone champ have Idea how to do it,suggest VBA
> >>> code then I click Button only & automatically Excel Table copy paste
> >>> in Word.I think it is fantastic shortcut & save more time.
> >>>
> >>> Thanks a lot in Advance.
> >>>
> >>> Best Regards,
> >>>
> >>> Amar
> >>>
> >>> --
> >>> Join official Facebook page of this forum @
> >>> https://www.facebook.com/discussexcel
> >>>
> >>> FORUM RULES
> >>>
> >>> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> >>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need
> Advice will
> >>> not get quick attention or may not be answered.
> >>> 2) Don't post a question in the thread of another member.
> >>> 3) Don't post questions regarding breaking or bypassing any security
> >>> measure.
> >>> 4) Acknowledge the responses you receive, good or bad.
> >>> 5) Jobs posting is not allowed.
> >>> 6) Sharing copyrighted material and their links is not allowed.
> >>>
> >>> NOTE  : Don't ever post confidential data in a workbook. Forum owners
> and
> >>> members are not responsible for any loss.
> >>> ---
> >>> You received this message because you are subscribed to the Google
> Groups
> >>> "MS EXCEL AND VBA MACROS" group.
> >>> To post to this group, send email to excel-macros@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> excel-macros+unsubscr...@googlegroups.com.
> >>> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
> >>>
> >>>
> >>
> >
> > --
> > Join official Facebook page of this forum @
> > https://www.facebook.com/discussexcel
> >
> > FORUM RULES
> >
> > 1) Use concise, accurate thread titles. Poor thread titles, like Please
> > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will
> > not get quick attention or may not be answered.
> > 2) Don't post a question in the thread of another member.
> > 3) Don't post questions regarding breaking or bypassing any security
> > measure.
> > 4) Acknowledge the responses you receive, good or bad.
> > 5) Jobs posting is not allowed.
> > 6) Sharing copyrighted material and their links is not allowed.
> >
> > NOTE : Don't ever post confidential data in a workbook. Forum owners and
> > members are not responsible for any loss.
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "MS EXCEL AND VBA MACROS" group.
> > To post to this group, send email to excel-macros@googlegroups.com.
> > To unsubscribe from this group, send email to
> > excel-macros+unsubscr...@googlegroups.com.
> > Visit this group at http://groups.google.com/group/excel-macros?hl=en.
> >
> >
>
> --
> Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted ma

Re: $$Excel-Macros$$ VBA Help:Excel table copy paste in word (with formatting as it)

2013-01-18 Thread vijayajith VA
Chage yourworksheet name .. as per your worksheet

On Sat, Jan 19, 2013 at 11:38 AM, vijayajith VA wrote:

> HI Amar,
> use below code..or Could you just share your workbook..
>
> Sub method1()
> Application.ScreenUpdating = False
> Application.Calculation = xlCalculationManual
>
> Dim wb As Workbook
> Dim ws As Worksheet
> Set wb = ThisWorkbook
> Set ws = wb.Worksheets("Feuil")
> Dim rng As Range
> Dim wdApp As New Word.Application
> Dim wdDoc As Word.Document
> Dim t As Word.Range
> Dim myWordFile As String
>
> myWordFile = ThisWorkbook.Path & "\Export2Word1.dot"
> Set rng = ws.Range(ws.Cells(1, 1), ws.Cells(21, 5))
> rng.Copy
> Set wdDoc = wdApp.Documents.Add(myWordFile)
> Set t = wdDoc.Content
> t.Paste
> wdApp.Visible = True
> wdApp.Activate
> Application.ScreenUpdating = True
> Application.Calculation = xlCalculationAutomatic
> End Sub
>
>
>
> On Sat, Jan 19, 2013 at 10:32 AM, amar takale wrote:
>
>> Dear All Champs,
>> Can anybody tell me first it is possible Excel table copy paste in
>> word (with formatting as it)?If yes how to do it.I am VBA learner only
>> not champ. So pls If anyone champ have Idea how to do it,suggest VBA
>> code then I click Button only & automatically Excel Table copy paste
>> in Word.I think it is fantastic shortcut & save more time.
>>
>> Thanks a lot in Advance.
>>
>> Best Regards,
>>
>> Amar
>>
>> --
>> Join official Facebook page of this forum @
>> https://www.facebook.com/discussexcel
>>
>> FORUM RULES
>>
>> 1) Use concise, accurate thread titles. Poor thread titles, like Please
>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
>> will not get quick attention or may not be answered.
>> 2) Don't post a question in the thread of another member.
>> 3) Don't post questions regarding breaking or bypassing any security
>> measure.
>> 4) Acknowledge the responses you receive, good or bad.
>> 5) Jobs posting is not allowed.
>> 6) Sharing copyrighted material and their links is not allowed.
>>
>> NOTE  : Don't ever post confidential data in a workbook. Forum owners and
>> members are not responsible for any loss.
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "MS EXCEL AND VBA MACROS" group.
>> To post to this group, send email to excel-macros@googlegroups.com.
>> To unsubscribe from this group, send email to
>> excel-macros+unsubscr...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>>
>>
>>
>

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.




Re: $$Excel-Macros$$ VBA Help:Excel table copy paste in word (with formatting as it)

2013-01-18 Thread vijayajith VA
HI Amar,
use below code..or Could you just share your workbook..

Sub method1()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual

Dim wb As Workbook
Dim ws As Worksheet
Set wb = ThisWorkbook
Set ws = wb.Worksheets("Feuil")
Dim rng As Range
Dim wdApp As New Word.Application
Dim wdDoc As Word.Document
Dim t As Word.Range
Dim myWordFile As String

myWordFile = ThisWorkbook.Path & "\Export2Word1.dot"
Set rng = ws.Range(ws.Cells(1, 1), ws.Cells(21, 5))
rng.Copy
Set wdDoc = wdApp.Documents.Add(myWordFile)
Set t = wdDoc.Content
t.Paste
wdApp.Visible = True
wdApp.Activate
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub



On Sat, Jan 19, 2013 at 10:32 AM, amar takale  wrote:

> Dear All Champs,
> Can anybody tell me first it is possible Excel table copy paste in
> word (with formatting as it)?If yes how to do it.I am VBA learner only
> not champ. So pls If anyone champ have Idea how to do it,suggest VBA
> code then I click Button only & automatically Excel Table copy paste
> in Word.I think it is fantastic shortcut & save more time.
>
> Thanks a lot in Advance.
>
> Best Regards,
>
> Amar
>
> --
> Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE  : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To post to this group, send email to excel-macros@googlegroups.com.
> To unsubscribe from this group, send email to
> excel-macros+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>
>
>

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.




$$Excel-Macros$$ VBA Help:Excel table copy paste in word (with formatting as it)

2013-01-18 Thread amar takale
Dear All Champs,
Can anybody tell me first it is possible Excel table copy paste in
word (with formatting as it)?If yes how to do it.I am VBA learner only
not champ. So pls If anyone champ have Idea how to do it,suggest VBA
code then I click Button only & automatically Excel Table copy paste
in Word.I think it is fantastic shortcut & save more time.

Thanks a lot in Advance.

Best Regards,

Amar

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.