Thanks Ashish

Really really grateful for your effort. PDF however will not work for me, i
managed to use this code below and its working for me about 95%,, which is
ok. the only issue with this code is that after exporting to word, you have
to double click it in it for it  to preview it in the excel background
before you can edit, when i use the paste value option too, it doesnt fit
perfectly in the word document.

you can try this code and see how it works. really grateful for your help
again. thanks

Sub exportToWord()

    Dim SheetName As String, NumLines As Integer
    Dim WordApp As Object
    Set WordApp = CreateObject("Word.Application")
    WordApp.Visible = True
    Worksheets(SheetName).Range("frontcover").Copy
    'you can replace the next line of code with
===>WordApp.Documents.Add.Content.Paste
    WordApp.Documents.Add.Content.PasteSpecial DataType:=wdPasteText
    Application.CutCopyMode = False
    Set WordApp = Nothing

End Sub



On Wed, Oct 17, 2012 at 4:35 PM, ashish koul <koul.ash...@gmail.com> wrote:

>  [image: Boxbe] <https://www.boxbe.com/overview> This message is eligible
> for Automatic Cleanup! (koul.ash...@gmail.com) Add cleanup 
> rule<https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.boxbe.com%2Fcleanup%3Ftoken%3DW3uG2QvM8PmogwWBkVIBf7TJMlHdQnPPWkTnq7prUOuykqm5VyNFLAWeZ5H5cgs1QZYmC9%252BWREYx1DXA1iOIOhUR6hGDGO77pLTUDhojVDfGKcLxLJZ1vItNIaVGOU0c%252FicYx2v1An1xEjR3za6Hig%253D%253D%26key%3DR5cMLzDIZdIvmxSfzjTU9undzXhXuxkBj35dJ8HXztc%253D&tc=12685652838_1072368539>|
>  More
> info<http://blog.boxbe.com/general/boxbe-automatic-cleanup?tc=12685652838_1072368539>
>
> Hi Hilary
>
>  I would suggest first you create proper tables in excel and . Avoid merge
> cells ,etc.
>
> Then in world create a template again with proper tables , etc . so that
> you know the row and column no of each cells
>
> Once u know the rows and columns of word  u can write macro to export data
> from excel to word (
> http://www.excelvbamacros.com/2011/11/find-row-and-column-number-of.html)
>
>
>
>
> *Else save the excel range as pdf( Only if u r using Excel 2007 and above
> version) instead of word*
>
> Sub Macro1()
>
> Dim fl_name As String
> fl_name = "C:\Documents and Settings\user\My Documents\abc.pdf"
>
> Sheets("TEMPLATE").Range("a1:f42").ExportAsFixedFormat Type:=xlTypePDF,
> Filename:= _
>         fl_name, _
>         Quality:=xlQualityStandard, IncludeDocProperties:=True,
> IgnorePrintAreas _
>         :=False, OpenAfterPublish:=True
>
> End Sub
>
>
>
>
>
> On Tue, Oct 16, 2012 at 6:31 PM, Hilary Lomotey <resp...@gmail.com> wrote:
>
>> Hello Ashish
>>
>> PFA
>>
>> On Tue, Oct 16, 2012 at 12:42 PM, <koul.ash...@gmail.com> wrote:
>>
>>>  [image: Boxbe] <https://www.boxbe.com/overview> This message is
>>> eligible for Automatic Cleanup! (koul.ash...@gmail.com) Add cleanup 
>>> rule<https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.boxbe.com%2Fcleanup%3Ftoken%3Da4aZUIf20i%252FeusA%252FHiyyGdc3XqB%252BCfCw63i5muZX1GczBVymJePsX44I25WjDRvc7cg4FvCLe7Dwdf29vHOxbCMfPj0wC18b2IxvwSwChvgr9coxiQcziRn%252FpnOt1PuJwV22BkReCe42%252F%252B0WaTG5YA%253D%253D%26key%3DxqjCKt56HkPuShSaa3oHap4%252FUbHDwR9kfjB5ucSsd2E%253D&tc=12674614608_1075924302>|
>>>  More
>>> info<http://blog.boxbe.com/general/boxbe-automatic-cleanup?tc=12674614608_1075924302>
>>>
>>> **
>>> Can u share excel file and output in word
>>> Sent on my BlackBerry® from Vodafone
>>> ------------------------------
>>> *From: * Hilary Lomotey <resp...@gmail.com>
>>> *Sender: * excel-macros@googlegroups.com
>>> *Date: *Tue, 16 Oct 2012 12:40:21 +0000
>>> *To: *excel-macros<EXCEL-MACROS@googlegroups.com>
>>> *ReplyTo: * excel-macros@googlegroups.com
>>> *Subject: *$$Excel-Macros$$ VBA code to export from excel to word
>>>
>>> Hello Experts
>>>
>>> i need a vba code to copy or export data from excel to word . i need to
>>> export sheet 3 to word, pls help with a code. thanks
>>>
>>> --
>>> Join official facebook page of this forum @
>>> https://www.facebook.com/discussexcel
>>>
>>> FORUM RULES (1120+ members already BANNED for violation)
>>>
>>> 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) Cross-promotion of, or links to, forums competitive to this forum in
>>> signatures are prohibited.
>>>
>>> 6) Jobs posting is not allowed.
>>>
>>> 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
>>>
>>> NOTE : Don't ever post personal or 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.
>>>
>>>
>>>
>>> --
>>> Join official facebook page of this forum @
>>> https://www.facebook.com/discussexcel
>>>
>>> FORUM RULES (1120+ members already BANNED for violation)
>>>
>>> 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) Cross-promotion of, or links to, forums competitive to this forum in
>>> signatures are prohibited.
>>>
>>> 6) Jobs posting is not allowed.
>>>
>>> 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
>>>
>>> NOTE : Don't ever post personal or 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.
>>>
>>>
>>>
>>>
>>  --
>> Join official facebook page of this forum @
>> https://www.facebook.com/discussexcel
>>
>> FORUM RULES (1120+ members already BANNED for violation)
>>
>> 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) Cross-promotion of, or links to, forums competitive to this forum in
>> signatures are prohibited.
>>
>> 6) Jobs posting is not allowed.
>>
>> 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
>>
>> NOTE : Don't ever post personal or 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.
>>
>>
>>
>
>
>
> --
> *Regards*
> * *
> *Ashish Koul*
>
>
> *Visit*
> *http://www.excelvbamacros.com/*
> *http://www.accessvbamacros.com/*
>
> P Before printing, think about the environment.
>
>
>
>  --
> Join official facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES (1120+ members already BANNED for violation)
>
> 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) Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> 6) Jobs posting is not allowed.
>
> 7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.
>
> NOTE : Don't ever post personal or 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.
>
>
>
>

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

FORUM RULES (1120+ members already BANNED for violation)

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)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

6) Jobs posting is not allowed.

7) Sharing copyrighted ebooks/pirated ebooks/their links is not allowed.

NOTE  : Don't ever post personal or 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.


Reply via email to